BulletDecorator.Bullet Propriedade

Definição

Obtém ou define o objeto a ser usado como o marcador em um BulletDecorator.

public:
 property System::Windows::UIElement ^ Bullet { System::Windows::UIElement ^ get(); void set(System::Windows::UIElement ^ value); };
public System.Windows.UIElement Bullet { get; set; }
member this.Bullet : System.Windows.UIElement with get, set
Public Property Bullet As UIElement

Valor da propriedade

UIElement

O UIElement a ser usado como o marcador. O padrão é null.

Exemplos

Os exemplos a seguir mostram como definir a Bullet propriedade.

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;
Dim bp As BulletDecorator = New BulletDecorator()
Dim i As Image = New Image()
Dim bi As BitmapImage = New BitmapImage()
bi.UriSource = New Uri("pack://application:,,./images/icon.jpg")
i.Source = bi
i.Width = 10
bp.Bullet = i
Dim tb As TextBlock = 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>

Comentários

A Bullet propriedade é uma propriedade de conteúdo do BulletDecorator controle e define a UIElement exibição como um marcador para o Child objeto.

O marcador definido definindo a Bullet propriedade como um UIElement é o primeiro elemento visual em um BulletDecorator controle. O elemento único Child é o segundo elemento visual.

Uso do elemento propriedade XAML

<object>  
  <object.Bullet>  
    <UIElement .../>  
  </object.Bullet>  
</object>  

Aplica-se a

Confira também