Επεξεργασία

Κοινή χρήση μέσω


InkCanvas.Select Method

Definition

Selects a set of ink Stroke objects and/or FrameworkElement objects.

Overloads

Select(IEnumerable<UIElement>)

Selects a set of UIElement objects.

Select(StrokeCollection)

Selects a set of ink Stroke objects.

Select(StrokeCollection, IEnumerable<UIElement>)

Selects a combination of Stroke and UIElement objects.

Remarks

An InkCanvas can contain Stroke objects, which are created in response to user stylus input, and FrameworkElement objects, such as Image and Button objects.

Selected strokes will be displayed with an adorner around them for ease of recognition and manipulation. FrameworkElement objects will not display differently when selected.

Select(IEnumerable<UIElement>)

Selects a set of UIElement objects.

public:
 void Select(System::Collections::Generic::IEnumerable<System::Windows::UIElement ^> ^ selectedElements);
public void Select (System.Collections.Generic.IEnumerable<System.Windows.UIElement> selectedElements);
member this.Select : seq<System.Windows.UIElement> -> unit
Public Sub Select (selectedElements As IEnumerable(Of UIElement))

Parameters

selectedElements
IEnumerable<UIElement>

A collection of UIElement objects to select.

Examples

The following example selects all the strokes and two elements on an InkCanvas. This example assumes that there is a TextBox called textbox1 and a Button called button1 - and that both controls are child elements of the InkCanvas.

inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})

Remarks

An InkCanvas can contain Stroke objects, which are created in response to user stylus input and UIElement objects, such as Image and Button objects.

Selected strokes are displayed with an adorner around them for ease of recognition and manipulation. UIElement objects will not display differently when selected. If a UIElement in selectedElements is not in the Children collection, Select ignores the UIElement.

Applies to

Select(StrokeCollection)

Selects a set of ink Stroke objects.

public:
 void Select(System::Windows::Ink::StrokeCollection ^ selectedStrokes);
public void Select (System.Windows.Ink.StrokeCollection selectedStrokes);
member this.Select : System.Windows.Ink.StrokeCollection -> unit
Public Sub Select (selectedStrokes As StrokeCollection)

Parameters

selectedStrokes
StrokeCollection

A collection of Stroke objects to select.

Exceptions

One or more strokes in selectedStrokes is not in the Strokes property.

Examples

The following example selects all the strokes and two elements on an InkCanvas. This example assumes that there is a TextBox called textbox1 and a Button called button1 - and that both controls are child elements of the InkCanvas.

inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})

Remarks

An InkCanvas can contain Stroke objects, which are created in response to user stylus input, and FrameworkElement objects, such as Image and Button objects.

Selected strokes are displayed with an adorner around them for ease of recognition and manipulation. FrameworkElement objects do not display differently when selected.

Applies to

Select(StrokeCollection, IEnumerable<UIElement>)

Selects a combination of Stroke and UIElement objects.

public:
 void Select(System::Windows::Ink::StrokeCollection ^ selectedStrokes, System::Collections::Generic::IEnumerable<System::Windows::UIElement ^> ^ selectedElements);
public void Select (System.Windows.Ink.StrokeCollection selectedStrokes, System.Collections.Generic.IEnumerable<System.Windows.UIElement> selectedElements);
member this.Select : System.Windows.Ink.StrokeCollection * seq<System.Windows.UIElement> -> unit
Public Sub Select (selectedStrokes As StrokeCollection, selectedElements As IEnumerable(Of UIElement))

Parameters

selectedStrokes
StrokeCollection

A collection of Stroke objects to select.

selectedElements
IEnumerable<UIElement>

A collection of UIElement objects to select.

Exceptions

One or more strokes in selectedStrokes is not included in the Strokes property.

Examples

The following example selects all the strokes and two elements on an InkCanvas. This example assumes that there is a TextBox called textbox1 and a Button called button1 - and that both controls are child elements of the InkCanvas.

inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})

Remarks

An InkCanvas can contain Stroke objects, which are created in response to user stylus input and UIElement objects, such as Image and Button objects.

Selected strokes will be displayed with an adorner around them for ease of recognition and manipulation. UIElement objects will not display differently when selected. If a UIElement in selectedElements is not in the Children collection, Select ignores the UIElement.

Applies to