Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 为什么可以';清除背景属性(wpf控件)_C#_Wpf_Properties - Fatal编程技术网

C# 为什么可以';清除背景属性(wpf控件)

C# 为什么可以';清除背景属性(wpf控件),c#,wpf,properties,C#,Wpf,Properties,为什么要使用以下方法清除背景 txb.Background.ClearValue(Control.BackgroundProperty); 破例 无法清除对象“#FFFFFFFF”的背景属性,因为它 处于只读状态” ?不需要.Background。应该是: txb.ClearProperty(Control.BackgroundProperty);

为什么要使用以下方法清除背景

txb.Background.ClearValue(Control.BackgroundProperty);
破例

无法清除对象“#FFFFFFFF”的背景属性,因为它 处于只读状态”


不需要
.Background
。应该是:

txb.ClearProperty(Control.BackgroundProperty);