![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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) |
| | 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) |
| | Re: Concept of Template Triggers and EventTriggers Thanks you very mcuh~~~ ![]() |
My System Specs![]() |
| | #4 (permalink) |
| | 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) |
| | 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 | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Avalon Concept | Windows Live | |||
| VISTA FORUM...what a concept!!!! | General Discussion | |||
| runas.exe - basic concept | Vista account administration | |||