我已经创建了一个名为
我可以帮你翻译成中文。这段内容涉及IT技术,它的意思是在App.xaml或MainWindow.xaml中这样引用它:
在View Designer中,窗口的背景颜色会变为红色,但是当应用程序运行时,其背景色却是默认的白色,为什么呢?该如何解决?
Dictionary1.xaml
的ResourceDictionary,以下是代码:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type Window}">
<Setter Property="Background" Value="Red">
</Setter>
</Style>
我可以帮你翻译成中文。这段内容涉及IT技术,它的意思是在App.xaml或MainWindow.xaml中这样引用它:
<Application.Resources>
<ResourceDictionary Source="Dictionary1.xaml" />
</Application.Resources>
<Window.Resources>
<ResourceDictionary Source="Dictionary1.xaml" />
</Window.Resources>
在View Designer中,窗口的背景颜色会变为红色,但是当应用程序运行时,其背景色却是默认的白色,为什么呢?该如何解决?