Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/332.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.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 - Fatal编程技术网

C# 如何取消设置默认样式';WPF中的二传手是谁?

C# 如何取消设置默认样式';WPF中的二传手是谁?,c#,wpf,C#,Wpf,有没有办法让我的控件从视觉父母那里继承它?可能是这样的 class MyControl : AnyParentClass { ... class MyControl : AnyParentClass { ... <MyControl Foreground="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=Foreground}" />

有没有办法让我的控件从视觉父母那里继承它?

可能是这样的

class MyControl : AnyParentClass { ...

class MyControl : AnyParentClass { ...
<MyControl
Foreground="{Binding RelativeSource={RelativeSource AncestorType=UserControl},
Path=Foreground}" />