Reputation: 15
I would like to use other symbols for the lists of the richeditbox, in addition to the only symbol present that is the "bullet", is possible?
For example the symbols in the fontfamily Wingdings.
Below the code to create the list with the "bullet" circle.
MainPage.xaml:
<Grid Width="700" Height="800">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<VariableSizedWrapGrid Orientation="Horizontal">
<Button x:Name="BtnBullet" Width="32" Height="32" Content="B" Click="BtnBullet_Click" Margin="5"/>
</VariableSizedWrapGrid>
<RichEditBox x:Name="RebText" Grid.Row="1" KeyDown="RebText_KeyDown"/>
</Grid>
MainPage.xaml.cs:
private void BtnBullet_Click(object sender, RoutedEventArgs e)
{
Windows.UI.Text.ITextSelection SelectedText = RebText.Document.Selection;
ITextParagraphFormat ParagraphFormatting = SelectedText.ParagraphFormat;
ParagraphFormatting.ListType = MarkerType.Bullet;
SelectedText.ParagraphFormat = ParagraphFormatting;
}
Thanks in advance
Upvotes: 0
Views: 251
Reputation: 32775
Currently, RichEditBox
does not provide such api to custom ParagraphFormatting
. You could only use MarkerType
existing enumeration. If you do want another symbol, please feel free to ask for this feature on UserVoice.
Upvotes: 0