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
2589
MaximizedStateChanged event
posted

Hi,

Is that possible to fire this event when TilePane state is really has changed, i.e. when pane really maximizes, all animation completes and so on. I need to get a pane size but in MaximizedStateChanged handler a get a size of previous state.

Thank you.

Parents
No Data
Reply
  • 3071
    Verified Answer
    posted

    Hi,
    Yes, it is possible to get a pane size when the animation completes.
    This sample shows how to do this:
    <igTV:XamWebTileView x:Name="tileView1" RowsInPage="3" ColumnsInPage="2"
    MaximizedStateChanging="tileView1_MaximizedStateChanging" ....
    p
    rivate void tileView1_MaximizedStateChanging(
    object sender, TileStateChangingEventArgs e)
    {
       TilePane tile = e.Element as TilePane;
       if (panel == null)
       {
          panel = tile.Parent
    as AnimatedPanel;
          panel.AnimationCompleted += panel_AnimationCompleted;
       }
       if (e.NewState == TileState.Maximized)
       {
          maxIndex = tileView1.Items.IndexOf(tile);
         System.Diagnostics.
    Debug.WriteLine("MaximizedStateChanged {0}", tile.ActualWidth);
       }
    }


    void panel_AnimationCompleted(object sender, EventArgs e)
    {
       if (maxIndex >= 0)
       {
          double width = tileView1.Items[maxIndex].ActualWidth;
          System.Diagnostics.
    Debug.WriteLine("AnimationCompleted {0}", width);
       }
    }
    Regards,
    Marin

     

     

Children