tags:

views:

624

answers:

3

I am currently trying to figure out a way to change the Bullet MarkerStyle when EditingCommands.ToggleBullets is executed. From what I understand CommandManager.Execute is executed before the togglebullets is done. So I am unable to simply go in and change the List.MarkerStyle with the ExecutedRoutedEvent. Can anyone point me in the right direction to do this? Another thing I was trying to see if I could even change the default MarkerStyle but didn't see any way to do this. Any help is appreciated. Thank you!

+1  A: 

I'm very unclear what you're trying to achieve, can you give an example.

You can change a List's default MarkerStyle in xaml:

<List MarkerStyle=Square>
    <ListItem>Item with a square</ListItem>
</List>
amaca
+1  A: 

Or include a style in your resources which will change all MarkerStyle properties for you:

<Style TargetType="List">
    <Setter Property="MarkerStyle" Value="Square" />
</Style>
Arcturus
A: 

Here is an example of what I am trying to do. I have an near empty element in my WPF. There are no Paragraphs or Lists already in it. Above this element I have a button that is bound to the RichTextBox and has Command="EditingCommands.ToggleBullets". Whenever I click on the ToggleBullets Button the RichtTextBox will have a List inserted into it unless the caret is inside a list in which case the element the that cursor is in is changed to a paragraph. This is a typical word processor feature. My problem is that I want the List that is inserted into the RichTextBox to have Property="MarkerStyle" Value"UpperLatin". I tried using a Style like Arcutus suggested and this works for Lists already in the RichTextBox, but when I use the ToggleBullets button it will only make Lists with "Disc". Once again any help is appreciated. And thank you for the replies thus far.