or
public class BackstageViewModel : IViewModel { public RecentFileList RecentFiles { get; set; } // the property I want to point to public BackstageViewModel(ApplicationCommandProxy commandProxy, DataHolder data) { //random setup stuff } //and so on...}<ItemsControl Name="RecentItem" DataContext="{Binding ssm:BackstageViewModel}" ItemsSource="{Binding RecentFiles.RecentFiles}" Focusable="True" DisplayMemberPath="RecentFiles"> <ItemsControl.Template> <ControlTemplate> <telerik:RadRibbonButton Width="285" Command="{x:Static commands:ApplicationCommands.RecentDocumentCommand}"> <StackPanel Orientation="Horizontal"> <Image Source="Resources/Open_16.png" /> <StackPanel Margin="3 0 0 0" HorizontalAlignment="Left"> <TextBlock Margin="0 0 0 2" Text="Example Study" /> <TextBlock Foreground="DimGray" Text="{Binding Path}" /> </StackPanel> </StackPanel> </telerik:RadRibbonButton> </ControlTemplate> </ItemsControl.Template></ItemsControl>
<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>