BulletDecorator.Bullet 속성

정의

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

속성 값

UIElement

글머리 기호로 사용할 UIElement입니다. 기본값은 null입니다.

예제

다음 예제에서는 설정 하는 방법을 보여는 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>

설명

Bullet 속성의 콘텐츠 속성은는 BulletDecorator 제어 하 고 정의 합니다 UIElement 에 글머리 기호로 표시할를 Child 개체입니다.

설정 하 여 정의 된 글머리 기호는 Bullet 속성을를 UIElement 첫 번째 시각적 요소를 BulletDecorator 컨트롤. 단일 Child 요소는 두 번째 visual 요소입니다.

XAML 속성 요소 사용

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

적용 대상

추가 정보