-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style definition in xaml #45
Comments
Sorry, I did not take into consideration the use of content and the property element together. <!-- xmlns:mdxam="clr-namespace:MdXaml;assembly=MdXaml" -->
<!-- <Grid> -->
<Grid.Resources>
<Style x:Key="MdStyle" TargetType="FlowDocument">
<Style.Resources>
<Style TargetType="Paragraph">
<Style.Triggers>
<Trigger Property="Tag" Value="Heading1">
<Setter Property="FontSize" Value="42" />
<Setter Property="Foreground" Value="Red" />
<Setter Property="FontWeight" Value="Light" />
</Trigger>
<Trigger Property="Tag" Value="Heading2">
<Setter Property="FontSize" Value="20" />
<Setter Property="Foreground" Value="Blue" />
<Setter Property="FontWeight" Value="Light" />
</Trigger>
</Style.Triggers>
</Style>
</Style.Resources>
</Style>
</Grid.Resources>
<mdxam:MarkdownScrollViewer
x:Name="MSV"
Grid.Column="1" Grid.Row="0"
MarkdownStyle="{StaticResource ResourceKey=MdStyle}"
xml:space="preserve">
# Heading 1
## Heading 2
content
</mdxam:MarkdownScrollViewer>
<!-- </Grid> --> |
Here is the example for newbie like me ;o)
` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I have this error message as soon I try to add style code in xaml.
I use MS Visual studio 22, with WPF application .NET 6
I have this error, with the demo code for Style
The text was updated successfully, but these errors were encountered: