BulletDecorator.Bullet Propriété

Définition

Obtient ou définit l'objet à utiliser comme puce dans un 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

Valeur de propriété

UIElement

UIElement à utiliser comme puce. La valeur par défaut est null.

Exemples

Les exemples suivants montrent comment définir la Bullet propriété.

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>

Remarques

La Bullet propriété est une propriété de contenu du BulletDecorator contrôle et définit la UIElement valeur à afficher comme une puce pour l’objet Child .

La puce définie en définissant la Bullet propriété sur un UIElement élément visuel est le premier élément visuel d’un BulletDecorator contrôle. L’élément unique Child est le deuxième élément visuel.

Utilisation des éléments de propriété XAML

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

S’applique à

Voir aussi