TextAlignment.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // RichTextKit
  2. // Copyright © 2019-2020 Topten Software. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License"); you may
  5. // not use this product except in compliance with the License. You may obtain
  6. // a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. // License for the specific language governing permissions and limitations
  14. // under the License.
  15. namespace Topten.RichTextKit
  16. {
  17. /// <summary>
  18. /// Species the alignment of text within a text block
  19. /// </summary>
  20. public enum TextAlignment
  21. {
  22. /// <summary>
  23. /// Use base direction of the text block.
  24. /// </summary>
  25. Auto,
  26. /// <summary>
  27. /// Left-aligns text to a x-coord of 0.
  28. /// </summary>
  29. Left,
  30. /// <summary>
  31. /// Center aligns text between 0 and <see cref="TextBlock.MaxWidth"/> unless not
  32. /// specified in which case it uses the widest line in the text block.
  33. /// </summary>
  34. Center,
  35. /// <summary>
  36. /// Right aligns text <see cref="TextBlock.MaxWidth"/> unless not
  37. /// specified in which case it right aligns to the widest line in the text block.
  38. /// </summary>
  39. Right,
  40. }
  41. }