0

I'm trying to create a very simple rich text editor control based on the richtextbox control and would like Numbers and bullets to be given the same indentation.

Using the togglebullets and togglenumbering commands in EditCommands I get numbers inserted with an indent much larger than bullets. Is there a way to line them up? Or at least give me an explanation as to why this is the case?

Thanks for your help!

James
  • 15
  • 6

1 Answers1

0

found this while searching for a different problem: my numbers are in a different font than the text ;) Nevertheless, I used this for adjusting the margins/indents for the lists - You have to put it somewhere before the flowDocument...

            <RichTextBox.Resources>
                <Style TargetType="{x:Type List}">
                    <Setter Property="Margin" Value="0" />
                    <Setter Property="MarkerOffset" Value="5" />
                    <Setter Property="Padding" Value="15,0,0,0" />
                </Style>
                <Style TargetType="{x:Type ListItem}">
                    <Setter Property="Margin" Value="0" />
                </Style>
            </RichTextBox.Resources>

Cheers, Stephan

Stephan
  • 86
  • 5
  • Ah, I should of known it would be in the styles. I guess it comes down to getting my head around all the constituent parts of a flow-document and experimenting with their styles. Thanks very much. :) – James Sep 21 '15 at 08:09