Export (0) Print
Expand All

BulletDecorator.Bullet Property

Gets or sets the object to use as the bullet in a BulletDecorator.

Namespace:  System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public UIElement Bullet { get; set; }
<object>
  <object.Bullet>
    <UIElement .../>
  </object.Bullet>
</object>

Property Value

Type: System.Windows.UIElement
The UIElement to use as the bullet. The default is null.

Content Model: The Bullet property is a content property of the BulletDecorator control and defines the UIElement to display as a bullet for the Child object.

The bullet that is defined by setting the Bullet property to a UIElement is the first visual element in a BulletDecorator control. The single Child element is the second visual element.

The following examples show how to set the Bullet property.

BulletDecorator bp = new BulletDecorator();
Image i = new Image();
BitmapImage bi= new BitmapImage(); 
bi.UriSource = new Uri(@"pack://application:,,/images/icon.jpg");
i.Source = bi;
i.Width = 10;
bp.Bullet = i;
TextBlock tb = new TextBlock();
tb.Text = "My Expander";
tb.Margin = new Thickness(20,0,0,0);     
bp.Child = tb;
<BulletDecorator>
  <BulletDecorator.Bullet>
    <Image Width="10" Source="images\icon.jpg"/>
  </BulletDecorator.Bullet>
  <TextBlock Margin="20,0,0,0">My Expander</TextBlock>
</BulletDecorator>

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft