C# 电传雷达窗
我在WPF中遇到了一些关于Telerik主题的问题 我添加了对Telerik.Windows.Themes.Windows8的引用,并使用文件App.xaml将资源与以下代码合并:C# 电传雷达窗,c#,wpf,telerik,C#,Wpf,Telerik,我在WPF中遇到了一些关于Telerik主题的问题 我添加了对Telerik.Windows.Themes.Windows8的引用,并使用文件App.xaml将资源与以下代码合并: <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/telerik.windows.controls.docking.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
我认为,当您使用隐式样式时,您需要声明您的窗口样式基于您导入的隐式样式。将此添加到
RadWindow
XAML中:
<telerik:RadWindow.Style>
<Style TargetType="telerik:RadWindow" BasedOn="{StaticResource RadWindowStyle}" />
</telerik:RadWindow.Style>
以下是一些可能证明有用的链接:
非常感谢您。我添加了你的代码,并用教程编辑了App.xaml文件,然后就成功了。。
RadWindow w = new RadWindow();
w.Width = 500;
w.Height = 500;
w.Show();
<telerik:RadWindow.Style>
<Style TargetType="telerik:RadWindow" BasedOn="{StaticResource RadWindowStyle}" />
</telerik:RadWindow.Style>
<Style BasedOn="{StaticResource RadWindowStyle}" TargetType="local:MainWindow" />