WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

Add property TextAlignment in DataGridTextColumn to support align the text in rows to right

Open quangtrang1111 opened this issue 4 years ago • 3 comments

Fixes

Fixes #4276

I add optional property named TextAlignment in the class DataGridTextColumn.

PR Type

Feature

What is the current behavior?

Currently, I cannot align the text in DataGridTextColumn to right.

What is the new behavior?

With the new optional property name TextAlignment we can align the text in rows.

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] Tested code with current supported SDKs
  • [ ] New component
    • [ ] Pull Request has been submitted to the documentation repository instructions. Link:
    • [ ] Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
    • [ ] If control, added to Visual Studio Design project
  • [ ] Sample in sample app has been added / updated (for bug fixes / features)
  • [ ] New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
  • [ ] Header has been added to all new source files (run build/UpdateHeaders.bat)
  • [x] Contains NO breaking changes

Other information

Here is the result after I implemented TextAlignment image

quangtrang1111 avatar Sep 28 '21 03:09 quangtrang1111

Thanks quangtrang1111 for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

ghost avatar Sep 28 '21 03:09 ghost

Hi @quangtrang1111, looks pretty good so far. Have you attempted to expose text alignment as a dependency property (much like FontFamily), so our users can more easily set this value in the XAML?

XAML-Knight avatar Sep 29 '21 21:09 XAML-Knight

Thanks for your suggestion @XAML-Knight. I made TextAlignment as a dependency property.

quangtrang1111 avatar Oct 07 '21 18:10 quangtrang1111