Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - <EventTrigger RoutedEvent="Button.Click">

 
 
Old 12-21-2006   #1 (permalink)
Horst Klein


 
 

<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

My System SpecsSystem Spec
Old 01-01-2007   #2 (permalink)
Keith Patrick


 
 

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().


My System SpecsSystem Spec
Old 01-11-2007   #3 (permalink)
thelemmings@gmail.com


 
 

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


My System SpecsSystem Spec
Old 01-12-2007   #4 (permalink)
Horst Klein


 
 

Re: <EventTrigger RoutedEvent="Button.Click">

This way I can't go, because I use loose-XAMLs.
And code behinde is not usable for our Application!
Horst


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
"right click" and "open" on an icon does not start the program! Vista General
Adressbook under "To:/Cc:" is not the same as under the button "Contacts". Vista mail
3xQ - "New Folder" button?, "- Shortcut" suffix, Preview bug? Vista file management
Start Menu - when I click on the "pictures" button nothing happens Vista file management


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46