DataGridTextColumn should support text trimming (with tooltip)
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
`DataGridTextColumn` should have an attribute that enables text trimming and provides a dynamic tooltip. Example:
```xaml
```
# Motivation
**This behavior is ubiquitous in grid-like UI elements throughout Windows OS and other software.** Text trimming is a strong UX feature; it communicates to the user that they are not viewing the entire block of text. A tooltip makes it easy to see that full text without adjusting the UI control, which may be difficult or impossible if resizing is disabled.
Many Windows programs have this proposed behavior. Examples in Windows 10 are File Explorer (details view) and Task Manager (Details or Services tab).
There are ways to implement this currently, but neither are very robust. Because `DataGridTextColumn` does not derive from `FrameworkElement`, it is not possible to use a style. Could use a `DataGridTemplateColumn`, but then you have the challenge of recreating the text template that `DataGridTextColumn` already provides.
# Implementation details
These details are based on my experience with the proposed behavior.
* The text trimming employed is CharacterEllipsis, as defined by `TextTrimming.CharacterEllipsis`.
* The tooltip is enabled only when the text is trimmed.
* The tooltip has a very quick initial show delay.
# Alternatives
* Separate text trimming and tooltip behavior:
```xaml
```
Contributor guide
Assessment
This issue has not been assessed yet.