-
[DX_WPF] ToolTip, SuperTipDevExpress/DX_WPF 2023. 6. 7. 17:25
<dx:DXWindow x:Class="DXSample.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:local="clr-namespace:DXSample" Height="350" Width="525" Title="MainWindow"> <Window.DataContext> <local:ViewModel /> </Window.DataContext> <Window.Resources> <DataTemplate x:Key="BottomArea"> <TextBlock FontFamily="Calibri" Foreground="Gray" FontSize="11" Text="{Binding}"/> </DataTemplate> <DataTemplate x:Key="ColumnCellToolTipTemplate"> <dx:SuperTipControl> <dx:SuperTip> <dx:SuperTipHeaderItem Content="User Information:"/> <dx:SuperTipItem Content="{Binding Name, Converter={local:ConcatStringsConverter}, ConverterParameter='Name'}"/> <dx:SuperTipItem Content="{Binding Id, Converter={local:ConcatStringsConverter}, ConverterParameter='Id'}"/> <dx:SuperTipItem Content="{Binding RegistrationDate, Converter={local:ConcatStringsConverter}, ConverterParameter='Registration Date'}"/> <dx:SuperTipItemSeparator/> <dx:SuperTipItem Content="GridColumn's CellToolTipTemplate" ContentTemplate="{StaticResource BottomArea}"/> </dx:SuperTip> </dx:SuperTipControl> </DataTemplate> <DataTemplate x:Key="ViewCellToolTipTemplate"> <dx:SuperTipControl> <dx:SuperTip> <dx:SuperTipItem Content="{Binding}"/> <dx:SuperTipItemSeparator/> <dx:SuperTipItem Content="TableView's CellToolTipTemplate" ContentTemplate="{StaticResource BottomArea}"/> </dx:SuperTip> </dx:SuperTipControl> </DataTemplate> </Window.Resources> <Grid> <dxg:GridControl ItemsSource="{Binding Items}"> <dxg:GridControl.Columns> <dxg:GridColumn FieldName="Name" CellToolTipBinding="{Binding}" CellToolTipTemplate="{StaticResource ColumnCellToolTipTemplate}" /> <dxg:GridColumn FieldName="Age" CellToolTipBinding="{Binding Name}" /> </dxg:GridControl.Columns> <dxg:GridControl.View> <dxg:TableView AutoWidth="True" CellToolTipTemplate="{StaticResource ViewCellToolTipTemplate}" /> </dxg:GridControl.View> </dxg:GridControl> </Grid> </dx:DXWindow>
Text가 다 안보일때 자동으로 Text fullName ToolTip으로 보여주는 ShowTooltipForTrimmedText
위 SuperTip을 사용해도 override되어짐.
사용자 정의 ToolTip을 사용시 사용자 정의 ToolTip만 보이게 하려면
ShowTooltipForTrimmedText="False"
<dxg:TreeListColumn FieldName="Name"> <dxg:TreeListColumn.EditSettings> <dxe:TextEditSettings ShowTooltipForTrimmedText="False" /> </dxg:TreeListColumn.EditSettings> </dxg:TreeListColumn>
SuperTip에 표시하는 image는 원본사이즈로 나옴.
image에 따라 SuperTip크기 달라짐.
Tooltip on TreeList cell in TreeListControl
You have yet to view any tickets. Your search criteria do not match any tickets. A server error occurred while processing your request. Please try again at a later time.
supportcenter.devexpress.com
GitHub - DevExpress-Examples/how-to-declare-cell-tooltips-t506603: .NET, WPF, DXGrid for WPF
.NET, WPF, DXGrid for WPF. Contribute to DevExpress-Examples/how-to-declare-cell-tooltips-t506603 development by creating an account on GitHub.
github.com
Cell Tooltip | WPF Controls | DevExpress Documentation
The Cell tooltip is a hint displayed when a user moves mouse pointer over a grid cell. To show a Cell tooltip, follow the steps below: Specify the BaseColumn.CellToolTipBinding property for columns that should display cell tooltips. Use the BaseColumn.Cell
docs.devexpress.com
How to show a custom cell tooltip for cells with truncated values
You have yet to view any tickets. Your search criteria do not match any tickets. A server error occurred while processing your request. Please try again at a later time.
supportcenter.devexpress.com
728x90'DevExpress > DX_WPF' 카테고리의 다른 글
[DX_WPF] Dynamic Load Modules In DevExpress MVVM For WPF (0) 2023.11.23 [DX_WPF] PropertyGridControl (0) 2023.06.20 [DX_WPF] dxmvvm:Interaction.Behaviors (0) 2023.05.19 [DX_WPF] dxmvvm:Interaction.Behaviors vs dxmvvm:Interaction.Triggers (0) 2023.05.16 [DX_WPF] TreeListView (0) 2023.05.09 댓글