Aracılığıyla paylaş


BulletDecorator.Bullet Özellik

Tanım

içinde BulletDecoratormadde işareti olarak kullanılacak nesneyi alır veya ayarlar.

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

Özellik Değeri

UIElement Madde işareti olarak kullanılacak. Varsayılan değer: null.

Örnekler

Aşağıdaki örneklerde özelliğin nasıl ayarlanacağı gösterilmektedir Bullet .

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>

Açıklamalar

Bullet özelliği denetimin BulletDecorator içerik özelliğidir ve nesnesinin madde işareti olarak görüntülenmesini UIElement tanımlarChild.

özelliği Bullet olarak ayarlanarak UIElement tanımlanan madde işareti, denetimdeki BulletDecorator ilk görsel öğedir. Tek Child öğe, ikinci görsel öğedir.

XAML Özellik Öğesi Kullanımı

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

Şunlara uygulanır

Ayrıca bkz.