Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarkdownTextBlock: Tables style improvements #615

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jcoc611-microsoft
Copy link

Before:
Screenshot 2024-11-29 105149

After:
Screenshot 2024-11-29 104946

Improvements:

  • Margins
  • Single Border element for outer lines which makes it possible to have corner radius
  • Header background (default color is lightest accent color, configurable)

@ShankarBUS
Copy link

Hi @jcoc611-microsoft

I have ported MarkdownTextBlock to Uno Platform and made some changes to it for my personal project.

image

https://github.com/symptum/Symptum/blob/dev/src/Symptum.UI/Markdown/TextElements/TableElement.cs

The changes I made include:

  • Removed of MyTableUIElement and used a plain Grid instead.
  • Applying the table border to the cell's grid rather than using a custom panel i.e. MyTableUIElement.
  • CornerRadius for each cell is calculated based on its index.
  • Added support for Grid Tables as well.
  • Rows can be colored alternatively.
  • Used Style instead of Brush, Thickness properties in MarkdownTheme allowing theme-awareness and more customizability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants