![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Concept of Template Triggers and EventTriggers Hi All I am so confused about Template/Style Triggers and EventTriggers. For previous ones, the Setter will trigger while condition is true. For the Event ones, actions will take while event occurs. Template/Style Triggers -----> Setters EventTriggers -----> Actions ( BeginStoryboard, ..etc) But I want to use some condition to play storyboard. I found I can't do this, or I want to use EventTriggers to do some Setter Is there any way to do that? Is there any concept I missed for these two different triggers? Thanks |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: Concept of Template Triggers and EventTriggers For starting actions when a condition is true use Enter/ExitActions <Style.Triggers> <Trigger Property="MyProperty" Value="True"> <Trigger.EnterActions> <BeginStoryboard> ... </Trigger.EnterActions> <Trigger.ExitActions> <BeginStoryboard> ... I don't think it's possible to use a setter in an event trigger. -- Valentin Iliescu [MVP C#] "HolaMan" wrote: > Hi All > > I am so confused about Template/Style Triggers and EventTriggers. > For previous ones, the Setter will trigger while condition is true. > For the Event ones, actions will take while event occurs. > > Template/Style Triggers -----> Setters > EventTriggers -----> Actions ( BeginStoryboard, ..etc) > > But I want to use some condition to play storyboard. > I found I can't do this, or I want to use EventTriggers to do some > Setter > > Is there any way to do that? > Is there any concept I missed for these two different triggers? > > Thanks > > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Concept of Template Triggers and EventTriggers Thanks you very mcuh~~~ ![]() |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Concept of Template Triggers and EventTriggers Hi~~ I discovered some sample use Event trigger of Button in XAML to replace write Event Handler in .cs EX. <Button.Triggers> <EventTrigger RoutedEvent="Button.Click"> <BeginStoryboard> .... </BeginStoryboard> </EventTrigger> </Button.Triggers> But I think if there is a SetterActions will be nice to use <Button.Triggers> <EventTrigger RoutedEvent="Button.Click"> <SetterAction> <Setter Property="SelectedIndex" Value="1" Targetname="TabControl"/> </SetterAction> </EventTrigger> </Button.Triggers> So I want to implement my own SetterAction derived from TriggerBase. I found I can't do this because of some inaccessible data structure. Is there any reaons or conflict logics for SetterActions ? Thanks Have a nice Day HolaMan |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: Concept of Template Triggers and EventTriggers Right or wrong (and I've heard arguments both ways), we decided not to support setters inside event triggers because unlike every other form of trigger, the setter would continue to apply even after the style/template/whatever containing the trigger had been removed. -Nick Kramer [MSFT] --- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "HolaMan" <reality.chang@gmail.com> wrote in message news:1144912453.570854.65300@i40g2000cwc.googlegroups.com... > Hi~~ > > I discovered some sample use Event trigger of Button in XAML to replace > write Event Handler in .cs > EX. > <Button.Triggers> > <EventTrigger RoutedEvent="Button.Click"> > <BeginStoryboard> > .... > </BeginStoryboard> > </EventTrigger> > </Button.Triggers> > > But I think if there is a SetterActions will be nice to use > <Button.Triggers> > <EventTrigger RoutedEvent="Button.Click"> > <SetterAction> > <Setter Property="SelectedIndex" Value="1" > Targetname="TabControl"/> > </SetterAction> > </EventTrigger> > </Button.Triggers> > > So I want to implement my own SetterAction derived from TriggerBase. > I found I can't do this because of some inaccessible data structure. > Is there any reaons or conflict logics for SetterActions ? > > Thanks > Have a nice Day > > HolaMan > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| autorun triggers Scan & Fix | beano | Vista General | 0 | 05-02-2008 01:54 PM |
| Proof-of-concept virus gives insight into OpenOffice.org securityfailings | Frank | Vista General | 10 | 05-23-2007 09:40 PM |
| IE7 Phishing Hole Info and Proof of Concept released | Steve | Vista security | 1 | 03-14-2007 10:37 PM |
| the concept of camera in 3D | Daniel | Avalon | 6 | 06-05-2006 02:06 AM |
| RE: EventTriggers not compiling.. | Wolf Schmidt [MSFT] | Avalon | 0 | 01-10-2006 03:52 PM |