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
135
Animation Begin and End events
posted

Is it possible to tie into the begin and end events of the panels changing between states? I need to hide the contents of the panel (its a html host) when the panel is moving about. Begen and End drag works great! but the transition between min and max is unavailable.

Parents
  • 3071
    Verified Answer
    posted

    Hi neo,
    Yes, you can use animation events.
    This is a small sample that can help you:
    TilePanel panel = null;
    object oldContent = null;
    void panel_AnimationStarted(object sender, EventArgs e)
    {
        tileView1.Items[2].Content =
    null;
    }
    void panel_AnimationCompleted(object sender, EventArgs e)
    {
        tileView1.Items[2].Content = oldContent;
    }
    private void tileView1_MaximizedStateChanging(object sender, TileStateChangingEventArgs e)
    {
        TilePane tile = e.Element as TilePane;
        panel = tile.Parent
    as TilePanel;
        if (panel != null)
        {
            oldContent = tileView1.Items[2].Content;
            panel.AnimationCompleted +=
    new EventHandler<EventArgs>(panel_AnimationCompleted);
            panel.AnimationStarted +=
    new EventHandler<EventArgs>(panel_AnimationStarted);
        }
    }
    Regards,
    Marin

Reply Children