InkCanvas.Select 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
选择一组墨迹 Stroke 对象和/或 FrameworkElement 对象。
重载
| 名称 | 说明 |
|---|---|
| Select(IEnumerable<UIElement>) |
选择一组 UIElement 对象。 |
| Select(StrokeCollection) |
选择一组墨迹 Stroke 对象。 |
| Select(StrokeCollection, IEnumerable<UIElement>) |
注解
可以InkCanvas包含Stroke对象,这些对象是在响应用户触笔输入和对象(如FrameworkElement和ImageButton对象)时创建的。
所选笔划将显示周围带有装饰器,以便于识别和操作。 FrameworkElement 选择时,对象不会以不同的方式显示。
Select(IEnumerable<UIElement>)
选择一组 UIElement 对象。
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))
参数
- selectedElements
- IEnumerable<UIElement>
要选择的对象 UIElement 集合。
示例
以下示例选择一个上的所有笔划和两个 InkCanvas元素。 此示例假定有一个调用控件和一个被调用TextBoxtextbox1控件,并且这两个Buttonbutton1控件都是该控件InkCanvas的子元素。
inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})
注解
可以InkCanvas包含Stroke对象,这些对象是在响应用户触笔输入和对象(如UIElementImage和Button对象)时创建的。
选择的笔划用装饰器围绕它们显示,以便于识别和操作。
UIElement 选择时,对象不会以不同的方式显示。
适用于
Select(StrokeCollection)
选择一组墨迹 Stroke 对象。
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)
参数
- selectedStrokes
- StrokeCollection
要选择的对象 Stroke 集合。
例外
一 selectedStrokes 个或多个笔划不在属性中 Strokes 。
示例
以下示例选择一个上的所有笔划和两个 InkCanvas元素。 此示例假定有一个调用控件和一个被调用TextBoxtextbox1控件,并且这两个Buttonbutton1控件都是该控件InkCanvas的子元素。
inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})
注解
可以InkCanvas包含Stroke对象,这些对象是在响应用户触笔输入和对象(如FrameworkElement和ImageButton对象)时创建的。
选择的笔划用装饰器围绕它们显示,以便于识别和操作。 FrameworkElement 选择对象时不会以不同的方式显示。
适用于
Select(StrokeCollection, IEnumerable<UIElement>)
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))
参数
- selectedStrokes
- StrokeCollection
要选择的对象 Stroke 集合。
- selectedElements
- IEnumerable<UIElement>
要选择的对象 UIElement 集合。
例外
属性中不包含selectedStrokes一个或多个笔划Strokes。
示例
以下示例选择一个上的所有笔划和两个 InkCanvas元素。 此示例假定有一个调用控件和一个被调用TextBoxtextbox1控件,并且这两个Buttonbutton1控件都是该控件InkCanvas的子元素。
inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})
注解
可以InkCanvas包含Stroke对象,这些对象是在响应用户触笔输入和对象(如UIElementImage和Button对象)时创建的。
所选笔划将显示周围带有装饰器,以便于识别和操作。
UIElement 选择时,对象不会以不同的方式显示。