# TextTrimming enum

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md) · Since v2.12

```cs
public enum TextTrimming
```

Trimming mode for text that does not fit the space available, used by [Label.Trimming](https://eto.picoe.ca/api/type/eto.forms.label/trimming.md) and [LinkButton.Trimming](https://eto.picoe.ca/api/type/eto.forms.linkbutton/trimming.md).

**Remarks:** This is the control equivalent of [FormattedTextTrimming](https://eto.picoe.ca/api/type/eto.drawing.formattedtexttrimming.md), which does the same for text you draw yourself. Trimming only takes effect when the control is given less room than its text needs. It does not change what the control asks the layout for, which is still the width of its full text - constrain the control (a scaled table cell, an explicit width, a parent that limits it) or it will simply be given the room it asked for and never trim. Wrapping and trimming together is only fully supported on WPF and WinUI, where a wrapped control trims the last line that fits. Mac, Gtk, WinForms and iOS say how a line ends with one native setting, and trimming a wrapped control there would mean knowing how many lines it is allowed, which nothing tells them - so when the control also wraps, the wrapping wins and the trimming has no effect. Set [WrapMode.None](https://eto.picoe.ca/api/type/eto.forms.wrapmode.md) alongside the trimming for behaviour that is the same everywhere. What each platform does with the trimming itself:

- WPF, WinUI, WinForms: both ellipsis modes, natively.
- Mac, Gtk, iOS, Android: an end ellipsis only, so [TextTrimming.WordEllipsis](https://eto.picoe.ca/api/type/eto.forms.texttrimming.md) gets [TextTrimming.CharacterEllipsis](https://eto.picoe.ca/api/type/eto.forms.texttrimming.md).
- WinForms [LinkButton](https://eto.picoe.ca/api/type/eto.forms.linkbutton.md): an end ellipsis only, and [LinkButton.Wrap](https://eto.picoe.ca/api/type/eto.forms.linkbutton/wrap.md) is not implemented - a native LinkLabel lays out its own text.
- Android: [Label.Wrap](https://eto.picoe.ca/api/type/eto.forms.label/wrap.md) and [LinkButton.Wrap](https://eto.picoe.ca/api/type/eto.forms.linkbutton/wrap.md) are not implemented, so only the trimming applies there.

## Values

| Name | Value | Description |
| --- | --- | --- |
| None | 0 | No trimming. Text too long for the control is clipped. |
| CharacterEllipsis | 1 | Show an ellipsis after the last character that fits. |
| WordEllipsis | 2 | Show an ellipsis after the last whole word that fits. |
