Closed andreas-spindler-mw closed 7 months ago
Yeah, you can't use static resource from a different file in the current state of the application because the resources haven't been built and compiled yet. Can you try to define BaseResourceKey
instead BasedOn
property in the style?
<Style TargetType="Button" Class="MyOutlinedButton" BaseResourceKey="BaseButtonStyle">
But OutlineButton
style doesn't have key in the library. So it's not possible to use it in this way. I'll add keys into library.
Hi! Yes, I can do this, but this will of course apply a border to all buttons, and not just use a different border width on the outline buttons. So, I understand that it is currently not possible to extend or change certain aspects of the current outline button style, right?
Yeah, you can't use static resource from a different file in the current state of the application because the resources haven't been built and compiled yet. Can you try to define
BaseResourceKey
insteadBasedOn
property in the style?<Style TargetType="Button" Class="MyOutlinedButton" BaseResourceKey="BaseButtonStyle">
But
OutlineButton
style doesn't have key in the library. So it's not possible to use it in this way. I'll add keys into library.
Added a pull for this
Awesome! Thank you so much, for the immediate support!
Can be closed
Hi there! I'm having a hard time adjusting individual properties on, as an example,
OutlinedButton
style class. I want to change the border width for all "OutlineButtons". But my changes either won't get applied, or I loose the existing outline button properties which I want to retain. I know I can use theStyleResource.Overrides
to overwrite entires styles. But that's not what I want. I'd like to extend an existing style class. How would I do that, without creating a second styleClass="ThickBorder"
which I would have to apply basically everywhere.In App.xaml
In Theme.xaml
Any help is highly appreciated. Thank you guys!