or
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style TargetType="{x:Type telerik:RadButton}" x:Key="BT" BasedOn="{StaticResource RadButtonStyle}"> <Setter Property="Height" Value="40"/> </Style> <Style TargetType="{x:Type telerik:RadButton}" BasedOn="{StaticResource RadButtonStyle}"> <Setter Property="Margin" Value="5"/> <Setter Property="Height" Value="30"/> </Style></ResourceDictionary>private void Windows7_Click(object sender, RoutedEventArgs e) { Application.Current.Resources.MergedDictionaries.Clear(); Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Themes.Windows7;component/Themes/System.Windows.xaml", UriKind.RelativeOrAbsolute) }); Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.xaml", UriKind.RelativeOrAbsolute) }); Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Themes.Windows7;component/Themes/Telerik.Windows.Controls.Input.xaml", UriKind.RelativeOrAbsolute) }); Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("MyStyles.xaml", UriKind.RelativeOrAbsolute) }); }<Window x:Class="WpfThemes.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow" Width="800" Height="600"> <Window.Resources> </Window.Resources> <Grid x:Name="LayoutRoot" Background="White" > <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <StackPanel Orientation="Horizontal" Background="#FFE5E5E5" HorizontalAlignment="Stretch"> <telerik:RadButton Content="Office Black" VerticalAlignment="Center" Width="110" Margin="10" Click="OfficeBlack_Click" /> <telerik:RadButton Content="Windows8" VerticalAlignment="Center" Width="110" Margin="10" Click="Windows8_Click" /> <telerik:RadButton Content="Windows 7" VerticalAlignment="Center" Width="110" Margin="10" Click="Windows7_Click" /> </StackPanel> <StackPanel Orientation="Vertical" Grid.Row="1" Margin="20" HorizontalAlignment="Left"> <telerik:RadComboBox Width="230" Margin="10"> <telerik:RadComboBoxItem Content="Item 1" /> <telerik:RadComboBoxItem Content="Item 2" /> <telerik:RadComboBoxItem Content="Item 3" /> <telerik:RadComboBoxItem Content="Item 4" /> <telerik:RadComboBoxItem Content="Item 5" /> </telerik:RadComboBox> <telerik:RadDateTimePicker Width="230" Margin="10" IsDropDownOpen="True" /> <StackPanel Orientation="Horizontal"> <telerik:RadButton>Button with Type Style</telerik:RadButton> <telerik:RadButton Style="{StaticResource BT}">Button With Keyed Style</telerik:RadButton> </StackPanel> </StackPanel> </Grid></Window><!-- This one works -->
<PropertyGrid:PropertyDefinition Binding="{Binding Stock.Name}" GroupName="Stock" DisplayName="Name" OrderIndex="9" />
<!-- This one does not show any text, even the FallbackValue when I intentionally mistype the binding path -->
<PropertyGrid:PropertyDefinition Binding="{Binding Stock.Name}" GroupName="Stock" DisplayName="Name" OrderIndex="10">
<PropertyGrid:PropertyDefinition.EditorTemplate>
<DataTemplate>
<TextBlock Text="{Binding Stock.Name, TargetNullValue='The value is null', FallbackValue='Problem getting text'}" />
</DataTemplate>
</PropertyGrid:PropertyDefinition.EditorTemplate>
</PropertyGrid:PropertyDefinition><UserControl.Resources> <Style TargetType="Controls2:RadPropertyGrid"> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> </Style></UserControl.Resources>