The sample app is the fastest way to understand what the library is good at.
Overview: high-level intro pageAccordion: variable-height sections driven by line countsBubbles: shrinkwrapped chat bubblesMasonry: card sizing in a masonry layoutRich Text: mixed formatting and inline compositionDynamic Layout: layout reacting to width changesEditorial Engine: page-like placement with constraintsJustification Comparison: greedy vs more advanced line fittingVariable ASCII: width-sensitive text using variable glyphsUse the samples as an API map:
| Sample | Main idea | APIs to inspect |
|---|---|---|
Accordion |
Repeated line counts during responsive layout | Prepare, Layout |
Bubbles |
Tight wrap width and chat bubble sizing | PrepareWithSegments, PreparedTextMetrics |
Masonry |
Card height estimation without materializing lines | Prepare, Layout |
Rich Text |
Streaming text into an inline composition pipeline | LayoutNextLine |
Dynamic Layout |
Reusing prepared text while width changes | PrepareWithSegments, WalkLineRanges, LayoutNextLine |
Editorial Engine |
Flowing text around obstacles and into columns | LayoutNextLine, ColumnFlowLayout, ObstacleLayoutHelper |
Justification Comparison |
Comparing line-fitting strategies on the same prepared data | PrepareWithSegments, WalkLineRanges, LayoutNextLine |
Start in samples/PretextSamples/MainPage.xaml.cs and then inspect the individual sample views in samples/PretextSamples/Samples. Those files show how the layout APIs are used in real panels and drawing code rather than in isolated snippets.