1
Public Class Author
{
Public String Name{get;set;}
Public String Description{get;set;}
Public int NumberOfBooks{get;set;}
}
아래 저자 클래스를 갖는 및
<ListBox ItemsSource="{Binding Authors}" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel ToolTipService.ToolTip="{Binding Description}" ToolTipService.Placement="Right">
<TextBlock Text="{Binding Name}"></TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
가 어떻게 XAML을 사용하여 툴팁을 생성 할 아래처럼 DataTemplate을 통해 목록 상자에 List<Author>
데이터 바인딩 컨트롤 바인딩 선언 설명 아래와 같이
AuthorName (NumberOfBooks)
Description