TextBoxBase.IsUndoEnabled 屬性

定義

取得或設定文字編輯控制項是否啟用復原支援的值。

public:
 property bool IsUndoEnabled { bool get(); void set(bool value); };
public bool IsUndoEnabled { get; set; }
member this.IsUndoEnabled : bool with get, set
Public Property IsUndoEnabled As Boolean

屬性值

如果啟用復原支援則為 true,否則為 false。 預設值是 true

範例

下列範例示範如何在 IsUndoEnabled XAML) 中使用 Extensible Application Markup Language (屬性。

<TextBox TextWrapping="Wrap"
         Name="myTextBox" 
         Width="500" 
         Height="200" 
         AcceptsReturn="True"
         IsUndoEnabled="True"
         VerticalScrollBarVisibility="Visible"
         HorizontalScrollBarVisibility="Auto" 
         Margin="25">

備註

將此屬性設定為 false 清除復原堆疊。 因此,如果您停用復原,然後重新啟用它,復原命令仍然無法運作,因為復原堆疊在您停用復原時已清空。

相依性屬性資訊

識別碼欄位 IsUndoEnabledProperty
中繼資料屬性設定為 true

適用於

另請參閱