You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make styles for the Markdown viewer that are applied to the whole application, because I intend to use several of them in different places in my app. The problem I'm having is my app is in dark mode, so I can't see heading text, since the built-in style sets it to black. I can only override the style by putting a Styles property on every MarkdownScrollViewer, which is really annoying.
I get the correct styling on the MarkdownScrollViewer if I do this in a UserControl:
<md:MarkdownScrollViewer xml:space="preserve" Margin="15,0">
<md:MarkdownScrollViewer.Styles>
<StyleInclude Source="/Theming/MarkdownStyles.axaml" />
</md:MarkdownScrollViewer.Styles>
# Login
Please enter your username and password to log in.
<md:MarkdownScrollViewer />
But my custom styles are overriden if I do this:
<UserControl.Styles>
</UserControl.Styles>
<md:MarkdownScrollViewer xml:space="preserve" Margin="15,0">
# Login
Please enter your username and password to log in.
<md:MarkdownScrollViewer
In both cases I can see the red background of the heading1. But in the second case, my setting for font weight and foreground color are overriden by the style with what looks like the values coming from here.
I'm not having this problem with any of the built-in Avalonia controls. So I'm not sure if I'm doing something wrong here.
The text was updated successfully, but these errors were encountered:
I'm trying to make styles for the Markdown viewer that are applied to the whole application, because I intend to use several of them in different places in my app. The problem I'm having is my app is in dark mode, so I can't see heading text, since the built-in style sets it to black. I can only override the style by putting a Styles property on every MarkdownScrollViewer, which is really annoying.
For example:
<Style Selector="ctxt|CTextBlock.Heading1"> </Style>My custom style looks like this:
I get the correct styling on the MarkdownScrollViewer if I do this in a UserControl:
<md:MarkdownScrollViewer />
But my custom styles are overriden if I do this:
<UserControl.Styles>
</UserControl.Styles>
<md:MarkdownScrollViewer
In both cases I can see the red background of the heading1. But in the second case, my setting for font weight and foreground color are overriden by the style with what looks like the values coming from here.
I'm not having this problem with any of the built-in Avalonia controls. So I'm not sure if I'm doing something wrong here.
The text was updated successfully, but these errors were encountered: