EditingCommands.DecreaseIndentation 属性

定义

表示 DecreaseIndentation 命令,该命令请求将当前段落的缩进减少一个制表位。

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

属性值

RoutedUICommand

请求的命令。 此命令的默认键手势为 CtrlT+Shift+。

示例

以下示例演示如何对支持该命令的对象调用编辑命令。

对于此示例,一个 RichTextBox 用作命令目标。 请注意, RichTextBox 实现 IInputElementFrameworkElement) 继承的接口 (,并且它包括对许多编辑命令的本机支持。

方法的第一个参数 Execute 是命令参数。 大多数编辑命令都忽略命令参数;通常,此参数应 null 用于编辑命令。

第二个参数指定命令将路由到的对象。 此对象必须实现 IInputElement 接口,并且应包含指定命令的处理程序。 通常,在未处理该命令的对象上调用时,将忽略命令。

RichTextBox rTB = new RichTextBox();

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

EditingCommands.ToggleInsert.Execute(Nothing, rTB)

注解

对于任何给定对象,不一定是响应此命令的实际实现;在许多情况下,响应命令的实现是应用程序编写器的责任。

此命令本机支持 RichTextBox

重要

除非文本元素的属性设置为 true,否则此命令对文本元素AcceptsTab没有影响。

XAML 属性用法

<object property="DecreaseIndentation"/>  

适用于

另请参阅