Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Button hover effect

Button hover effect

Scheduled Pinned Locked Moved WCF and WF
databasehelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    elektrowolf
    wrote on last edited by
    #1

    I changed the Background property of a Button.. But when I'm hovering the Button, the Button background turns normal again. I tried to add a trigger for hovering but it doesnt work..:

    local:ButtonEx.Triggers
    <Trigger Property="local:ButtonEx.IsMouseOver" Value="True">
    <Setter Property="local:ButtonEx.Background" Value="Red" />
    </Trigger>
    </local:ButtonEx.Triggers>

    I get an XamlParseException telling me: Content of the type System.Windows.Trigger cannot be added to a System.Windows.TriggerCollection. (Translated from German) *confused* I just have no clue, where my mistake could be.. Maybe you could help?

    L 1 Reply Last reply
    0
    • E elektrowolf

      I changed the Background property of a Button.. But when I'm hovering the Button, the Button background turns normal again. I tried to add a trigger for hovering but it doesnt work..:

      local:ButtonEx.Triggers
      <Trigger Property="local:ButtonEx.IsMouseOver" Value="True">
      <Setter Property="local:ButtonEx.Background" Value="Red" />
      </Trigger>
      </local:ButtonEx.Triggers>

      I get an XamlParseException telling me: Content of the type System.Windows.Trigger cannot be added to a System.Windows.TriggerCollection. (Translated from German) *confused* I just have no clue, where my mistake could be.. Maybe you could help?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Do a search on Button Control Templates. The best and quickest way to accomplish this task, is to retemplate the button. Plenty of article on the web, especially in the Expression Blend spaces. In Blend, this takes seconds to accomplish.

      Cheers, Karl » CodeProject 2008 MVP My Blog | Mole's Home Page | XAML Power Toys Home Page

      Just a grain of sand on the worlds beaches.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups