我想问一个关于该代码的问题,它的简单XAML代码如下所示。wpf财产继承
<Window x:Class="WpfApplication15.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" Background="Orange" FontStyle="Italic">
<StackPanel>
<Label>blo</Label>
<Button>hi</Button>
<Button>hi2</Button>
</StackPanel>
</Window>
所以干脆我们可以想象,标签背景的橙色,但按钮的背景颜色不会成为橙将作为默认值,但所有控件FontStyle将是斜体,这样的问题是!为什么在根目录下的所有控件的fontstyle都会受到影响,但按钮的背景却不是?
所以我一定要记住哪些属性可以被打破或不!我需要坚实的回答逻辑 – user418308 2010-08-12 11:48:49