Black Screen When Showing RadWindow or RadRibbonWindow With NoXaml dlls
Environment
Product Version | 2022.2.621 |
Product | RadWindow/RadRibbonWindow for WPF |
Description
Black screen is displayed when you open a WPF RadWindow
or RadRibbonWindow
and the NoXaml Telerik dlls are used.
Solution
This happens when you create a custom control that derives from RadWindow
or RadRibbonWindow
. For example, if you use the window as a UserControl. In this case, you should also define a style for the custom control and base it on the default window style. This is required for all custom controls that derive from Telerik controls. Read more in the Styling the Controls article.
RadWindow style
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/System.Windows.xaml" />
<ResourceDictionary Source="Themes/Telerik.Windows.Controls.xaml" />
<ResourceDictionary Source="Themes/Telerik.Windows.Controls.Navigation.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- style for a custom window -->
<Style TargetType="local:MainWindow" BasedOn="{StaticResource RadWindowStyle}" />
</ResourceDictionary>
RadRibbonWindow style
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Themes/System.Windows.xaml" />
<ResourceDictionary Source="Themes/Telerik.Windows.Controls.xaml" />
<ResourceDictionary Source="Themes/Telerik.Windows.Controls.Navigation.xaml" />
<ResourceDictionary Source="Themes/Telerik.Windows.Controls.RibbonView.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- style for a custom ribbon window -->
<Style TargetType="local:MainWindow" BasedOn="{StaticResource RadRibbonWindowStyle}" />
</ResourceDictionary>