Set tooltip on customized tab header in WPF
来源:互联网 发布:python项目实战 编辑:程序博客网 时间:2024/05/09 13:54
<UserControl> <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="TextBlocks.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </UserControl.Resources> <TabItem><TabItem.Header> <TextBlock Style="{StaticResource TabItemHeaderStyle}" Text="xxx" ToolTip="xxx"/></TabItem.Header></TabItem></UserControl>
in TextBlocks.xaml, customize header style for selection behaviour.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style x:Key="TabItemHeaderStyle" TargetType="{x:Type TextBlock}"> <Style.Triggers> <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TabItem}}}" Value="True"> <Setter Property="Foreground" Value="#1fa5d8"/> <Setter Property="FontWeight" Value="Bold"/> </DataTrigger> <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TabItem}}}" Value="False"> <Setter Property="Foreground" Value="#4c4c4c"/> <Setter Property="FontWeight" Value="Normal"/> </DataTrigger> </Style.Triggers> </Style></ResourceDictionary>
0 0
- Set tooltip on customized tab header in WPF
- Set a customized attr in style file
- Wpf Button Style customized
- Enter-to-Tab in WPF
- wpf click on datagrid to open tab
- WPF下可编辑Header的Tab控件实现
- WPF Datagrid Tooltip
- wpf 自定义Tooltip template
- WPF-004 控件 ToolTip
- wpf toolTip自定义
- wpf Tooltip样式
- WPF ToolTip控件使用
- 【Tooltip】WPF中Tooltip使用技巧总结
- 【Tooltip】WPF中Tooltip使用技巧总结
- 【Tooltip】WPF中Tooltip使用技巧总结
- Inflate layout file in customized view
- Kibana displays customized percentage in pie chart
- WPF 为按钮添加Tooltip
- Android------startActivityForResult的详细用法
- sql 中穿件GUID
- WAN广域网基础
- 判断数据是否为整数
- iOS录音和播放
- Set tooltip on customized tab header in WPF
- DDMS工具使用
- __FUNCSIG__、__FUNCDNAME__、__FUNCTION__和__func__的区别和联系
- quick-cocos2d-x 系列之——环境搭建(Mac版)
- 简单密码破解
- 对称加密和非对称加密介绍和区别
- JsonBinder工具类,json字符串输出
- IOS APP 图标
- golang chan make前后值比较