2012-11-09 57 views

回答

2

您可以像設置任何其他屬性一樣設置ToolTip屬性。

示例代碼如下

<Style TargetType="{x:Type ListBoxItem}"> 
    <Setter Property="ToolTip" Value="ToolTip Value" /> 
</Style> 
0

對於更復雜的工具提示使用

<Style TargetType="{x:Type ListBoxItem}"> 
    <Setter Property="ToolTip"> 
     <Setter.Value> 
      <!--Content Here--> 
      <!--<Grid> or <StackPanel> or <ContentPresenter>...--> 
     </Setter.Value> 
    </Setter> 
</Style>