<Window x:Class="GridViewApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:GridViewApp"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        Title="MainWindow"
        Width="525"
        Height="350">
    <Window.DataContext>
        <local:MainViewModel />
    </Window.DataContext>
    <Window.Resources>
        <Style TargetType="telerik:GridViewCell">
            <Setter Property="Foreground" Value="Red" />
        </Style>

        <local:StyleConverter x:Key="notesButtonStyleConverter">
            <local:StyleConverter.HasNotes>
                <Style TargetType="telerik:RadRibbonButton">
                    <Setter Property="SmallImage" Value="/Images/objects.png" />
                </Style>
            </local:StyleConverter.HasNotes>
            <local:StyleConverter.NoNotes>
                <Style TargetType="telerik:RadRibbonButton">
                    <Setter Property="SmallImage" Value="/Images/notes.png" />
                </Style>
            </local:StyleConverter.NoNotes>
        </local:StyleConverter>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding Products}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Price}" Header="Price" />
                <telerik:GridViewColumn Header="Notes">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadRibbonButton Name="btnObj"
                                                     Style="{Binding Converter={StaticResource notesButtonStyleConverter}}"
                                                     Text="RibbonButton" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>
