dotnet / dotnet/winforms

Add Justified HorizontalAlignment for RichTextBox

Open
#10,792 6 comments 1 reaction 0 assignees View on GitHub
api-suggestion area-controls-RichEdit
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### Background and motivation

I noticed that RTF documents support Justified alignment, yet RichTextBoxes do not provide the ability to set that alignment for some reasons.

### API Proposal

```csharp
public enum HorizontalAlignment
{
Left = 0,
Right = 1,
Center = 2,
Justified = 3
}
```

### API Usage

```csharp
RichTextBox richTextBox = new RichTextBox();
richTextBox.SelectionAlignment = HorizontalAlignment.Justified;
```

### Alternative Designs

_No response_

### Risks

None.

### Will this feature affect UI controls?

It should be supported by the designer. It won't have any impact on accessibility. And obviously it doesn't need to be localized.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.