Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
790
XamGrid Row Selector
posted

Hi,

I want to change the style of the row selector when the mouse is over the row (not only over the row selector).

How can i do it?

  • 17559
    posted

    Hello michaelgr1 ,

    I was just wondering did you have a chance to try my suggestion. If you still need any assistance on the matter, please do not hesitate to ask.

  • 17559
    posted

    Hello michaelgr1,

     

    I have been looking into your question and I can suggest you create a style for the RowSelectorCellCotnrol in this style you can trigger new content template depending on the IsSelected property of the current selected row. In order to achieve this you can try the following style for example:

                            <Style TargetType="{x:Type igPrim:RowSelectorCellControl}">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Cell.Row.IsSelected }" Value="True">
                                        <Setter Property="ContentTemplate">
                                            <Setter.Value>
                                                <DataTemplate>
                                                    <Rectangle Fill="Red" Width="10" Height="10" />
                                                </DataTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Cell.Row.IsSelected }" Value="False">
                                        <Setter Property="ContentTemplate">
                                            <Setter.Value>
                                                <DataTemplate>
                                                    <Rectangle Fill="Aqua"  Width="10" Height="10"  />
                                                </DataTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </DataTrigger>
                                </Style.Triggers>                         
                            </Style>
    

                           

    For additional refernce you can check the attached sample.

    Please let me know if you need any additional assistance with this matter.

    RowSelectorStyleXG.zip