locked
Question about WPF Events in Expression Blend RRS feed

  • Question

  • Hello,

    Yes another newb with Expression Blend/Silverlight/WPF...Sorry if these questions are annoyingly newb like.

    My issue:  A developer I work with created this WPF application.  There are two User Controls. These user controls are in separate XAML files. When you run the application, it works as follows: Clicking a button thats in one User Contorl will  reveal the other (simple enough).  He created this functionality by using a C# method: UserControl.Show( ); and placed at the end of a function he created.

    This works fine and when I click the button, it shows like it should...But from a design standpoint, I was hoping to maybe create a more interesting effect when a user clicks the button... Perhaps instead of just showing like normal, it can show with a cool transition effect.

    My question is:  Is there anyway in Expression Blend, to create an Event Handler without having to write the C# code?

    I know how to work with objects that exist in the same XAML file using behaviors and states using the States/Assets/Objects and Timeline panel.  But for the life of me, I can find out any way to add an Event to an object without the C# code behind file opening up. (like when I double click an event in the "Events View" under the Properties panel.

    Thanks for any help.

    Kdubbie

    Wednesday, February 23, 2011 6:24 PM

All replies

  • You can create a Storyboard in Blend with some transition effects (e.g. fade-in/fade-out).
    But you have to write some piece of code for starting the Storyboard at the click-event.

    Friday, February 25, 2011 7:26 AM