开发者

Sketchflow component target parent state

开发者 https://www.devze.com 2023-01-02 17:59 出处:网络
I\'m using Sketchflow in Expression Blend 4 RC (although this is relevant to Blend 3 too). I have a screen with a datagrid on it (MainScreen) and there\'s a \"New\" button.

I'm using Sketchflow in Expression Blend 4 RC (although this is relevant to Blend 3 too).

I have a screen with a datagrid on it (MainScreen) and there's a "New" button.

I have a component screen that has a generic form (GenericForm) and a "Save and close" button.

I have two states on MainScre开发者_开发知识库en:

State1 (and default): GenericForm visibility set to Hidden

State2: GenericForm visibility set to Visible

The "New" button on MainScreen has: Active State = State2, meaning when the "New" button is pressed, it changes the state of MainScreen to State2 (where the GenericForm component is visible).

My problem is that I cannot link the "Save and close" button on GenericForm to State1 on MainScreen. In effect I would like to be able to press "Save and close" and for the MainScreen to set its state to State1.

Any ideas?


Are you using WPF or Silverlight? In WPF you can use routed events to bubble up an event like that into the parent control, I posted a simple example here: http://chuckhays.net/2010/05/21/very-simple-routed-event-example/

If you are using Silverlight, I can try to come up with another example that will help you.

0

精彩评论

暂无评论...
验证码 换一张
取 消