Skip to content

Import loose XAML documents as text - #814

Open
Himanshi Goyal (himgoyalmicro) wants to merge 1 commit into
mainfrom
fix/text-only-xaml-import
Open

Himanshi Goyal (himgoyalmicro) wants to merge 1 commit into
mainfrom
fix/text-only-xaml-import

Conversation

@himgoyalmicro

@himgoyalmicro Himanshi Goyal (himgoyalmicro) commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Import selected FlowDocument files through a bounded XML reader.
  • Reconstruct supported content using FlowDocument, Paragraph, Run, and LineBreak objects.
  • Load the bundled GoButton UI from the application's compiled resources.
  • Clarify in the file picker that loose XAML uses text-only import.

Styles, images, controls, bindings, resources, and markup extensions from selected files are intentionally not imported.

Testing

  • Built the DocumentSerialization project.
  • Launched the Thumbnail Viewer.
  • Opened the included chocolate.xaml sample.
  • Verified that document text, pagination, and page thumbnails render correctly.
Microsoft Reviewers: Open in CodeFlow

Parse selected FlowDocument files as bounded XML and reconstruct supported text content without loading the file's object graph. Load the bundled bookmark UI from the application's compiled resources.

Changes:
- ThumbViewer.xaml.cs: add bounded text-only FlowDocument import and use the compiled GoButton resource

Tools: skill: codeblend-commit

Co-authored-by: CodeBlend <aka.ms/codeblend> & Claude <noreply@anthropic.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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