-
Notifications
You must be signed in to change notification settings - Fork 23
How to customise style List
whistyun edited this page Dec 5, 2020
·
1 revision
In Markdown.Avalonia, List is rendered used by Grid control which has 'List' class. And list mark is CTextBLock which has 'ListMaker'
<!--
xmlns="https://github.com/avaloniaui"
xmlns:ctxt="clr-namespace:ColorTextBlock.Avalonia;assembly=ColorTextBlock.Avalonia"
-->
<Style Selector="Grid.List">
<Setter Property="Background" Value="Gray"/>
</Style>
<Style Selector=".List ctxt|CTextBlock">
<Setter Property="Margin" Value="7"/>
<Setter Property="Background" Value="AliceBlue"/>
<Setter Property="FontSize" Value="28"/>
</Style>
<Style Selector="ctxt|CTextBlock.ListMarker">
<Setter Property="Margin" Value="7"/>
<Setter Property="Background" Value="Red"/>
</Style>
list example
* listitem1
* listitem2