語言

EditingCommands.SelectUpByParagraph 屬性

定義

代表 SelectUpByParagraph 指令,請求將當前選取範圍擴展一個段落。

public:
 static property System::Windows::Input::RoutedUICommand ^ SelectUpByParagraph { System::Windows::Input::RoutedUICommand ^ get(); };
public static System.Windows.Input.RoutedUICommand SelectUpByParagraph { get; }
static member SelectUpByParagraph : System.Windows.Input.RoutedUICommand
Public Shared ReadOnly Property SelectUpByParagraph As RoutedUICommand

屬性值

命令。 此指令的預設按鍵手勢為 Ctrl+Shift+Up。

範例

以下範例示範如何在支援該指令的物件上呼叫編輯指令。

在此例子中,a RichTextBox 作為指令目標。 請注意,該RichTextBoxIInputElement介面FrameworkElement實作自 ,且包含對許多編輯指令的原生支援。

該方法的 Execute 第一個參數是一個指令參數。 大多數編輯指令會忽略指令參數;一般來說,這個參數應該用於 null 編輯指令。

第二個參數指定指令將被路由到哪個物件。 此物件必須實作介面, IInputElement 並應包含指定指令的處理器。 一般來說,當指令在未處理該指令的物件上被呼叫時,會被忽略。

RichTextBox rTB = new RichTextBox();

EditingCommands.ToggleInsert.Execute(null, rTB);
Dim rTB As New RichTextBox()

EditingCommands.ToggleInsert.Execute(Nothing, rTB)

備註

如果插入符號位於段落開頭,此指令會將選取範圍擴展到前一段的開頭。 否則,此指令會將選取範圍擴展到當前段落的開頭。

對於任何特定物件,並不一定有實際實作能回應此指令;在許多情況下,回應指令的實作由應用程式撰寫者負責。

此指令原生由 RichTextBox、 TextBox、 PasswordBox及 支援。

XAML 屬性使用方式

<object property="SelectUpByParagraph"/>

適用於

另請參閱