Wpf 使用隐式样式时不显示RadWindow

Wpf 使用隐式样式时不显示RadWindow,wpf,telerik,Wpf,Telerik,我正在尝试使用隐式样式显示RadWindow,但它似乎比预期的困难得多。为了简单起见,我还在这里创建了一个示例项目,您必须添加Telerik的程序集才能运行它,您可以下载它 我已将我的RadWindow定义为 但我看不到。。。如果我转向显式风格,它会起作用。。。我已经尝试过这个建议,但没有成功,我做错了什么?您需要添加对定义隐式样式的主题程序集的引用,例如Telerik.Windows.Themes.Windows8.dll,然后将主题资源字典合并到您的应用程序中,例如在App.xaml中: &

我正在尝试使用隐式样式显示RadWindow,但它似乎比预期的困难得多。为了简单起见,我还在这里创建了一个示例项目,您必须添加Telerik的程序集才能运行它,您可以下载它

我已将我的RadWindow定义为


但我看不到。。。如果我转向显式风格,它会起作用。。。我已经尝试过这个建议,但没有成功,我做错了什么?

您需要添加对定义隐式样式的主题程序集的引用,例如Telerik.Windows.Themes.Windows8.dll,然后将主题资源字典合并到您的应用程序中,例如在App.xaml中:

<telerik:RadWindow x:Class="LightWeightGrid.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:LightWeightGrid"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    mc:Ignorable="d"
    Header="Window1" Height="300" Width="300">

<telerik:RadWindow.Style>
    <Style TargetType="telerik:RadWindow" BasedOn="{StaticResource RadWindowStyle}" />
</telerik:RadWindow.Style>
<Grid>
   <TextBlock Text="Here I'm"></TextBlock>
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
    Window1 w = new   Window1();
    w.Show();
}
<Application x:Class="WpfApplication1.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008">
  <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.Navigation.xaml"/>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Application.Resources>
</Application>