Skip to content

Conversation

@niels9001
Copy link
Collaborator

@niels9001 niels9001 commented Jan 9, 2026

  • Updating a few default styles
  • Large images would be stretched beyond their parent container width. This PR fixes that and images will now scale accordingly when the image is larger than the actual window / parent size.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the MarkdownTextBlock image handling by replacing fixed Width/Height sizing with a MaxWidth/MaxHeight constraint-based approach, preventing images from being stretched beyond their parent container. It also includes XAML formatting improvements for the theme options pane and updates to sample documentation.

  • Changed image sizing from fixed dimensions to flexible MaxWidth/MaxHeight constraints to prevent stretching
  • Simplified constraint application logic by directly using MaxWidth/MaxHeight instead of complex scaling calculations
  • Reformatted XAML file with consistent indentation and attribute placement

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
MyImage.cs Refactored image sizing logic to use MaxWidth/MaxHeight constraints instead of fixed dimensions, allowing images to scale properly within their containers
ThemeOptionsPane.xaml Applied consistent code formatting with proper indentation and line breaks
MarkdownTextBlockCustomThemeSample.xaml.cs Added documentation about image corner radius feature and included additional sample image

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Arlodotexe and others added 2 commits January 9, 2026 19:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Tests that theme constraints should not enlarge images smaller than the constraint
- Tests that precedent dimensions from markdown syntax should be respected
- Tests that theme constraints properly limit larger images
- Reveals current bugs where constraints are always applied regardless of context
Copy link
Member

@Arlodotexe Arlodotexe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surfaced a few regressions:

  • This should be fixed in this PR before closing. Failing tests have been pushed to demonstrate the issue.
  • The missing image corner radius bit should be handled in a new PR.

The remaining review comments from Copilot are either trivial and already merged or false positives.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@niels9001 niels9001 requested a review from Arlodotexe January 13, 2026 23:43
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.

2 participants