InkCanvas.Select 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
選擇一組墨水 Stroke 物件和/或 FrameworkElement 物件。
多載
| 名稱 | Description |
|---|---|
| Select(IEnumerable<UIElement>) |
選擇一組 UIElement 物件。 |
| Select(StrokeCollection) |
選擇一組墨水 Stroke 物件。 |
| Select(StrokeCollection, IEnumerable<UIElement>) |
備註
An InkCanvas 可以包含物件,這些物件是根據使用者觸控筆輸入而產生的,也可以Stroke包含FrameworkElement物件,例如 Image and Button objects。
選定的筆劃會以裝飾裝飾展示,方便辨識與操作。 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的所有筆劃和兩個元素。 此範例假設存在被呼叫的 TextBox 和 textbox1 被呼叫Button的 ——且兩個控制項都是 的button1InkCanvas子元素。
inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})
備註
An InkCanvas 可以包含 Stroke 物件,這些物件是根據使用者觸控筆輸入 UIElement 和物件(如 Image and Button objects)所建立的。
選定的筆劃會以裝飾裝飾標示,方便辨識與操作。
UIElement 選取物件時不會有不同的顯示方式。 若 UIElement in selectedElements 不在子集中, Select 則忽略 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的所有筆劃和兩個元素。 此範例假設存在被呼叫的 TextBox 和 textbox1 被呼叫Button的 ——且兩個控制項都是 的button1InkCanvas子元素。
inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})
備註
An InkCanvas 可以包含物件,這些物件是根據使用者觸控筆輸入而產生的,也可以Stroke包含FrameworkElement物件,例如 Image and Button objects。
選定的筆劃會以裝飾裝飾標示,方便辨識與操作。 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的所有筆劃和兩個元素。 此範例假設存在被呼叫的 TextBox 和 textbox1 被呼叫Button的 ——且兩個控制項都是 的button1InkCanvas子元素。
inkCanvas1.Select(inkCanvas1.Strokes, new UIElement[] { textbox1, button1 });
inkCanvas1.Select(inkCanvas1.Strokes, New UIElement() {textbox1, button1})
備註
An InkCanvas 可以包含 Stroke 物件,這些物件是根據使用者觸控筆輸入 UIElement 和物件(如 Image and Button objects)所建立的。
選定的筆劃會以裝飾裝飾展示,方便辨識與操作。
UIElement 選取物件時不會有不同的顯示方式。 若 UIElement in selectedElements 不在子集中, Select 則忽略 UIElement。