Condividi tramite


BulletDecorator.Bullet Proprietà

Definizione

Ottiene o imposta l’oggetto da utilizzare come punto elenco nel 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

Valore della proprietà

UIElement

L’oggetto UIElement da utilizzare come punto elenco. Il valore predefinito è null.

Esempio

Negli esempi seguenti viene illustrato come impostare la Bullet proprietà.

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>

Commenti

La Bullet proprietà è una proprietà del contenuto del BulletDecorator controllo e definisce l'oggetto UIElement da visualizzare come punto elenco per l'oggetto Child .

Il punto elenco definito impostando la Bullet proprietà su un UIElement è il primo elemento visivo in un BulletDecorator controllo. L'elemento singolo Child è il secondo elemento visivo.

Utilizzo della sintassi XAML per elementi proprietà

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

Si applica a

Vedi anche