Share via


EditingCommands.IncreaseIndentation 屬性

定義

表示 IncreaseIndentation 命令,這個命令會要求目前段落的縮排增加一個定位停駐點。

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

屬性值

RoutedUICommand

所要求的命令。 此命令的預設按鍵手勢為 Ctrl + T

範例

下列範例示範如何在支援 命令的物件上叫用編輯命令。

在此範例中,做 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

重要

除非 AcceptsTab text 元素的 屬性設定為 true ,否則此命令不會影響文字元素。

XAML Attribute Usage

<object property="IncreaseIndentation"/>  

適用於

另請參閱