Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Transitions and Effects when navigating to Views

$
0
0
Hi,

In order to apply effect to your PopupWindow, you could subscribe to the Loaded and Closing events of your window in the code behind, and apply the corresponding effects on the handlers of these events.
publicpartialclass MyPopupWindow : Window
{
    public MyPopupWindow()
    {
        this.Loaded += Shell_Loaded;
        this.Closing += Shell_Closing;
        InitializeComponent();
    }

    void Shell_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    {
        //exit animation
    }

    void Shell_Loaded(object sender, RoutedEventArgs e)
    {
        //start animation
    }

}
Hope this helps,

Federico Martinez
http://blogs.southworks.net/fmartinez

Viewing all articles
Browse latest Browse all 1878