✅ Trying to edit button onMouseOver styles, but to no avail
I'm trying to get my MouseOver effects altered in my styles, but so far I've not been able to edit the mouseover styles. It keeps reverting back to the default blue style when
IsMouseOver
= true
My current style (attempt?)
20 Replies
You cannot set the property directly when using a style, it must be set in the style.
I'm sorry, what? 😅
Isn't it in the style?
Oh, my apologies.
I just got a little confused 😅
I've also tried doing:
To no avail
This is just an example
to manipulate the ispressed/ismouseover
How come this one uses border instead of button in the template?
I dont know where u got yours from
but this is the actual button template
if u have a button inside a button it wouldn't make much sense
I've been pretty much doing the
F around and find out
thing 😅 I saw the border one as well, but wanted to add to the styles
but fair enough, lemme try to fiddle around againwell what u normally do is
u right click the button in the designer
and go to mmmm I forgot the name sec
Edit a Copy
I am not using a designer 😅 I am using Rider, and afaik Rider does not have a designer
and then it gives u the full template
of the button
BlazeBin Basic - ekwxvsytivlp
A tool for sharing your source code with the world!
Yay! This worked! Thanks 😅 I just had to use Border instead of Button :catfacepalm: which I guess makes sense now
and this is what the full template looks like
so as u can see there the default is
u can also see this on the docs
Button Styles and Templates - WPF .NET Framework
Learn about styles and templates for the Windows Presentation Foundation Button control. Modify the ControlTemplate to give the control a unique appearance.
Fair enough. Thanks for sharing that docs
no worries 😉 $close
If you have no further questions, please use /close to mark the forum thread as answered