Hello,
create a new WPF application, add references to Telerik.Windows.Controls and Telerik.Windows.Themes.Office2013.
Then, replace App.xaml with:
Replace MainWindow.xaml with:
Run the application: the list box items have a black border around them, as defined in the border style. But that's wrong because this is not a default style, so it should not be applied in this case.
Patrick
create a new WPF application, add references to Telerik.Windows.Controls and Telerik.Windows.Themes.Office2013.
Then, replace App.xaml with:
<Application x:Class="WpfApplication1.App" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/> <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml"/> </ResourceDictionary.MergedDictionaries> <Style x:Name="MyBorderStyle" TargetType="Border"> <Setter Property="BorderBrush" Value="Black" /> <Setter Property="BorderThickness" Value="1" /> </Style> </ResourceDictionary> </Application.Resources></Application>Replace MainWindow.xaml with:
<Window x:Class="WpfApplication1.MainWindow" Title="MainWindow" Height="350" Width="525"> <tk:RadListBox Margin="10"> <tk:RadListBoxItem Content="One" /> <tk:RadListBoxItem Content="Two" /> <tk:RadListBoxItem Content="Three" /> </tk:RadListBox></Window>Run the application: the list box items have a black border around them, as defined in the border style. But that's wrong because this is not a default style, so it should not be applied in this case.
Patrick