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
510
XamGrid: custom pager not highlighting selected page
posted

Hi,

I'm using Infragistics NetAdvantage Silverlight Ver 2010.2 XamGrid, and custom pager template given in samples, but it is not highlighting selected page, is there any way that I can do that ?, and is there any way to go to any page programmatically?

regards,

kthatik1.

  • 6912
    Verified Answer
    posted

    Hi,

    I guess that you are referring to this sample - http://labs.infragistics.com/silverlight/lobsamples/2010.2/#/Samples/Grid/Styling/CustomHeaderFooter .

    If you want to highlight the current page item you have to change the Selected state in PageItemStyle.

    for example:
    change this:
    <VisualStateGroup x:Name="SelectionStates">
     <VisualState x:Name="Unselected" />
     <VisualState x:Name="Selected" />
    </VisualStateGroup>

    to:
    <VisualStateGroup x:Name="SelectionStates">
     <VisualState x:Name="Unselected" />
     <VisualState x:Name="Selected">
      <Storyboard>
       <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pagerItem"
                 Storyboard.TargetProperty="Foreground">
        <DiscreteObjectKeyFrame KeyTime="0"
              Value="Red" />
       </ObjectAnimationUsingKeyFrames>
      </Storyboard>
     </VisualState>
    </VisualStateGroup>

    This will make the Foreground of the selected item Red.

    To set the current page programmatically use the XamGrid.PagerSettings.CurrentPageIndex.

    HTH