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
471
alternate row color change style and context menu style
posted

 

 

 

 

 

 

 

Hi,

     I kept a  style  for context menu in xam grid  in grid resources..How can i set a the other style  for

alternative row record  For the   same datarecordCellArea   as target  type..

error is coming  tat  2 styles cannot be setted  for grid styles.. 

any other way  to set the alternative row color..i want to set  blue or brown color   for alternative rows...

 

<Style TargetType="{x:Type igDP:DataRecordCellArea}"  >
                        <Setter Property="ContextMenu" Value="{StaticResource imageMenu}" />
                    </Style>

 

 

 

 

 

 

 

 

 

 

 

Parents
No Data
Reply
  • 9836
    Suggested Answer
    posted

    Hello,

    You can try with the following style for the DataRecordCellArea:

    <Style TargetType="{x:Type igDP:DataRecordCellArea}">
          <Style.Triggers>
                            <DataTrigger Binding="{Binding Path=IsAlternate, RelativeSource={RelativeSource Self}}" Value="True">
                                    <Setter Property="ContextMenu" Value="{StaticResource menu1}"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=IsAlternate, RelativeSource={RelativeSource Self}}" Value="False">
                                     <Setter Property="ContextMenu" Value="{StaticResource menu2}"/>
                            </DataTrigger>
          </Style.Triggers>
     </Style>

    Hope this helps

    Vlad

Children
No Data