In both Application tag in app.xaml and Window tag in MainWindow.xaml file. Xmlns:myApp = "clr-namespace:StackOverflow" The we can use the style as in HoverButton īecause HoverButton is not using the project namespace we need to add Then add the following style in App.xaml file inside Application.Resources tag Readonly static Brush DefaultHoverBackgroundValue = new BrushConverter().ConvertFromString("#FFBEE6FD") as Brush How to use after we created the ButtonEx-class: As others already said, there seems to be no good solution to do that easily.īut to keep your code clean I suggest creating a seperate class that hides the ugly XAML.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |