diff --git a/docs/README.md b/docs/README.md index d142f6cad..41ef136d5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -27,6 +27,7 @@ guides under *Getting started*. - [Complex layout tutorials](dock-complex-layouts.md) – Multi-window and plug-in walkthroughs. - [Styling and theming](dock-styling.md) – Customize the appearance of Dock controls. - [Control recycling](dock-control-recycling.md) – Reuse visuals when dockables return. +- [Proportional StackPanel](dock-proportional-stackpanel.md) – Layout panel with adjustable proportions. - [Advanced guide](dock-advanced.md) – Custom factories and runtime features. ## Reference @@ -34,6 +35,7 @@ guides under *Getting started*. - [Reference guide](dock-reference.md) – Overview of the core APIs. - [Glossary](dock-glossary.md) – Definitions of common Dock terms. - [Dockable property settings](dock-dockable-properties.md) – Configure per item behaviour. +- [Markup extensions](dock-markup-extensions.md) – Load and reference XAML fragments. ## Troubleshooting diff --git a/docs/dock-markup-extensions.md b/docs/dock-markup-extensions.md new file mode 100644 index 000000000..c25a0ba5d --- /dev/null +++ b/docs/dock-markup-extensions.md @@ -0,0 +1,30 @@ +# Dock Markup Extensions + +Dock ships with two simple markup extensions that complement Avalonia's XAML loader. They are distributed in the `Dock.MarkupExtension` package and can be used independently from the docking system. + +## `LoadExtension` + +`LoadExtension` loads a XAML fragment from a URI at runtime and returns the resulting object instance. This is handy when you want to keep small pieces of XAML in separate files without creating data templates. + +```xaml + +``` + +The URI is resolved relative to the current `IUriContext`. Any element type can be loaded. When used as a binding the created object becomes the property value. + +## `ReferenceExtension` + +`ReferenceExtension` returns an element by name from the current `INameScope`. It mirrors the behaviour of WPF's `x:Reference` markup extension. + +```xaml + +