Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 152623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:39:24+00:00 2026-05-11T09:39:24+00:00

I have an event trigger that I want to be fired in response to

  • 0

I have an event trigger that I want to be fired in response to two different routed events. I don’t want to repeat the event response code (in XAML) twice. Can I specify multiple routed events for a single event trigger declaration?

Example of a single event:

<Style.Triggers>     <EventTrigger RoutedEvent='Button.MouseEnter'>         <--XAML MAGIC-->         ... 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:39:24+00:00Added an answer on May 11, 2026 at 9:39 am

    Sorry… WPF’s implementation of the EventTrigger only allows one routed event.

    Typically you would be firing a storyboard from a routed event. I would suggest the following compromise:

    <!--Define a storyboard as a resource--> <Storyboard x:Key='MyStoryboard1'>    <!--Many properties and etc...--> </Storyboard>  <Style.Triggers>    <EventTrigger RoutedEvent='Button.MouseEnter'>       <BeginStoryboard Storyboard='{StaticResource MyStoryboard1}'>          <!--Other properties/name if necessary-->       </BeginStoryboard>    </EventTrigger>    <EventTrigger RoutedEvent='Button.MouseDown'>       <BeginStoryboard Storyboard='{StaticResource MyStoryboard1}'>          <!--Other properties/name if necessary-->       </BeginStoryboard>    </EventTrigger> </Style.Triggers> 

    The concept is to reduce duplicate code by sharing resources.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom event that I want to fire using jQuery's trigger method:
I have found that dragend event in Google Map also trigger the click event
In my app I have certain events that trigger a lot of emails (~100).
I have event manager process that dispatches events to subscribers (e.g. http_session_created, http_sesssion_destroyed). If
With sql Server 2005. I have declared a trigger that get fired AFTER INSERT,
We have a textbox that we want to both trigger a jQuery UI datepicker,
I have event Button that creates text box in run time. Private Sub Button1_Click(ByVal
If have an event that fires when a user clicks outside of text field,
On my pages I have several different elements that are showing different representations of
I have a control with a tooltip. What i want is that when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.