Share via


FrameworkCompatibilityPreferences.KeepTextBoxDisplaySynchronizedWithTextProperty 屬性

定義

取得或設定值,指出資料繫結 TextBox 是否應在其 Text 屬性上顯示與來源值相同字串。

public:
 static property bool KeepTextBoxDisplaySynchronizedWithTextProperty { bool get(); void set(bool value); };
public static bool KeepTextBoxDisplaySynchronizedWithTextProperty { get; set; }
static member KeepTextBoxDisplaySynchronizedWithTextProperty : bool with get, set
Public Shared Property KeepTextBoxDisplaySynchronizedWithTextProperty As Boolean

屬性值

如果資料繫結 TextBox 應在 Text 屬性上顯示與來源的值相同的字串則為 true,否則為 false

備註

此屬性的預設值取決於應用程式的目標 WPF 版本。 如果您的應用程式是以 WPF 4.0 或更早版本為目標,則預設值為 false 。 如果您的應用程式以 WPF 4.5 為目標,則預設值為 true 。 如果您使用這個屬性來變更 WPF 的行為,您必須在應用程式的存留期內提早變更屬性值,例如繼承自 Application 之類別的建構函式。 讀取值之後,您無法再次變更此值。

適用於