Thursday, December 8, 2011

WPF: Bulletdecorator XAML example

BulletDecorator is basically like any editor bullet (like MS word's bullet). You can specify how to draw the bullet itself and decorate what ever you need.

Suppose we want to do the following effect in WPF:

  • This is a bullet
Here is the source for it:
Code Snippet
  1. <BulletDecorator>
  2.     <BulletDecorator.Bullet>
  3.         <Polygon Margin=" 2, 0, 0, 0" Points="0, 5 5, 0 10, 5 5, 10" Fill=" Blue" />
  4.     </BulletDecorator.Bullet>
  5.     <TextBlock Margin="10, 0, 0, 0" Text="This is a bullet" />
  6. </BulletDecorator>


And here is the results:



Source - Bulletdecorator in WPF | Controls | w3mentor

No comments:

Post a Comment