好吧,我知道我的問題可能是超dumb-但我無法找到解決我的自我所以我在這裏問上午你的幫助:設置提示最大寬度風格
在wpf
我有一個DataGrid
與不同的風格。
現在,我需要設置工具提示最大寬度。
這是我的風格DataGridCell
:
<Style TargetType="DataGridCell" x:Key="MyDataGridCellStyle">
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="DataGridCell_PreviewMouseLeftButtonDown" />
<EventSetter Event="PreviewTextInput" Handler="DataGridCell_PreviewTextInput" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Background" Value="White" />
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self},Path=Content.Text}"/>
</Style>
我怎麼添加到工具提示最大寬度的風格?
中,而不是將樣式放在DataGrid.Resources下,我只是將它放到應用程序中。 XAML。 TNX! – DasDas