Share via


IToolboxExample.CreateExample Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Creates an example instance of an item in the toolbox with preset properties.

Namespace:  Microsoft.Windows.Design
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Function CreateExample ( _
    context As EditingContext _
) As ModelItem
ModelItem CreateExample(
    EditingContext context
)
ModelItem^ CreateExample(
    EditingContext^ context
)
abstract CreateExample : 
        context:EditingContext -> ModelItem 
function CreateExample(
    context : EditingContext
) : ModelItem

Parameters

Return Value

Type: Microsoft.Windows.Design.Model.ModelItem
A ModelItem that corresponds to the example instance.

Remarks

The width and height properties are used to specify the default size for a control when it is created by using mouse gestures. For example, in the toolbox, you can double-click or drag an item to add it to the design surface.

Most layout properties are overridden after creation, but the size is preserved.

.NET Framework Security

See Also

Reference

IToolboxExample Interface

Microsoft.Windows.Design Namespace

IToolboxExampleFactory

ToolboxExampleAttribute