![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 | <EventTrigger RoutedEvent="Button.Click"> I have an idea, but I dont know how to realise it in XAML. The online dokumentation gives not really an anser to my problem. So, what will I do? I try to call a custom Class, Property or Methode (with whatever it works) with an Trigger (EventTrigger, ActionTrigger or whatever it works) <Button x:Name="MyButton" Content="Button"> <Button.Triggers> <EventTrigger RoutedEvent="Button.Click"> <UseMyClass> </UseMyClass> </EventTrigger> </Button.Triggers> </Button> How can I do that? Thanks for support. Horst |
| | #2 (permalink) |
| Guest | Re: <EventTrigger RoutedEvent="Button.Click"> You can call a custom property with: <Setter PropertyName="" Value=""/> There is a whole family of XSetter's Not sure about methods, and classes are not executable per se unless you count a main() method, in which case you wouldn't have to support "class execution" anyway since method execution would cover it via the main(). |
| | #3 (permalink) |
| Guest | Re: <EventTrigger RoutedEvent="Button.Click"> You can call a custom property with: <Setter PropertyName="" Value=""/> There is a whole family of XSetter's Not sure about methods, and classes are not executable per se unless you count a main() method, in which case you wouldn't have to support "class execution" anyway since method execution would cover it via the main(). |
| | #4 (permalink) |
| Guest | Re: <EventTrigger RoutedEvent="Button.Click"> Why not try something simple like: <Button x:Name="MyButton" Content="Button" Click="MyOnClickMethod" /> With an implemention of MyOnClickMethod in your code behind: void Click="MyOnClickMethod"(object sender, RoutedEventArgs rea) { // Do your stuff } Luc Horst Klein wrote: > I have an idea, but I dont know how to realise it in XAML. > The online dokumentation gives not really an anser to my problem. > > So, what will I do? > > I try to call a custom Class, Property or Methode (with whatever it works) > with an Trigger (EventTrigger, ActionTrigger or whatever it works) > > <Button x:Name="MyButton" Content="Button"> > <Button.Triggers> > <EventTrigger RoutedEvent="Button.Click"> > <UseMyClass> > > </UseMyClass> > </EventTrigger> > </Button.Triggers> > </Button> > > How can I do that? > > Thanks for support. > Horst |
| | #5 (permalink) |
| Guest | Re: <EventTrigger RoutedEvent="Button.Click"> Why not try something simple like: <Button x:Name="MyButton" Content="Button" Click="MyOnClickMethod" /> With an implemention of MyOnClickMethod in your code behind: void Click="MyOnClickMethod"(object sender, RoutedEventArgs rea) { // Do your stuff } Luc Horst Klein wrote: > I have an idea, but I dont know how to realise it in XAML. > The online dokumentation gives not really an anser to my problem. > > So, what will I do? > > I try to call a custom Class, Property or Methode (with whatever it works) > with an Trigger (EventTrigger, ActionTrigger or whatever it works) > > <Button x:Name="MyButton" Content="Button"> > <Button.Triggers> > <EventTrigger RoutedEvent="Button.Click"> > <UseMyClass> > > </UseMyClass> > </EventTrigger> > </Button.Triggers> > </Button> > > How can I do that? > > Thanks for support. > Horst |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adressbook under "To:/Cc:" is not the same as under the button "Contacts". | Philippe - Swiss | Vista mail | 9 | 09-10-2007 02:22 PM |
| 3xQ - "New Folder" button?, "- Shortcut" suffix, Preview bug? | Julian | Vista file management | 7 | 06-26-2007 07:32 AM |
| The "X" Button. ~The Huge {Close} Button~ | pcr_neo | Vista General | 6 | 04-05-2007 08:36 PM |
| Start Menu - when I click on the "pictures" button nothing happens | rene | Vista file management | 1 | 03-27-2007 09:34 PM |
| Custom RoutedEvent in EventTrigger of CustomControl Style. | Illumineo | Avalon | 1 | 08-17-2006 07:05 PM |