Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

<EventTrigger RoutedEvent="Button.Click">

Closed Thread
 
Thread Tools Display Modes
Old 12-21-2006   #1 (permalink)
Horst Klein
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
Old 01-01-2007   #2 (permalink)
Keith Patrick
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().


Old 01-01-2007   #3 (permalink)
Keith Patrick
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().


Old 01-11-2007   #4 (permalink)
thelemmings@gmail.com
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


Old 01-11-2007   #5 (permalink)
thelemmings@gmail.com
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


Old 01-12-2007   #6 (permalink)
Horst Klein
Guest


 

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


Old 01-12-2007   #7 (permalink)
Horst Klein
Guest


 

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


Closed Thread

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








Vistax64.com 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 2005-2008

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 47 48 49 50