Share via


Selection.PrimarySelection Property

Gets the primary selection object.

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

Syntax

'Declaration
Public ReadOnly Property PrimarySelection As ModelItem
    Get
public ModelItem PrimarySelection { get; }
public:
property ModelItem^ PrimarySelection {
    ModelItem^ get ();
}
member PrimarySelection : ModelItem
function get PrimarySelection () : ModelItem

Property Value

Type: Microsoft.Windows.Design.Model.ModelItem
If the selection contains objects, the primary selection object; otherwise, nulla null reference (Nothing in Visual Basic).

Remarks

When multiple objects are selected in a designer, one object is the primary selection object. The primary selection object is often used as a key for other behaviors. For example, to align all selected objects to the left, the primary selection object determines where to align the objects.

.NET Framework Security

See Also

Reference

Selection Class

Microsoft.Windows.Design.Interaction Namespace

SelectionCommands

SelectionOperations

SelectionTool

EditingContext

Other Resources

WPF Designer Extensibility Architecture