csharpmarkup2-winui-wpf-0-8-1
VincentH-Net
released this
30 Mar 17:53
·
176 commits
to master
since this release
What's Changed
- Improvements for
Style
:- No need to use
new
in value setters - New
Bind
extension methods for binding a dependency property in a Style
- No need to use
- Add
ItemsPanelTemplate
helpers - Add
ControlTemplate
,ContentPresenter
andVisualStateManager
helpers (WPF, Uno Platform) - Add
BindTemplate
helper to bind to the templated parent from within aControlTemplate
(WPF, Uno Platform) - Add
ControlTemplate
usage in example sln (WPF, Uno Platform) - Hot Reload in example now works for editing styles (WPF)
Known limitations:
- The WinUI 3 Desktop platform does not offer
ControlTemplate
related helpers yet, pending a fix for this WinUI 3 issue.
This is because WinUI 3 Desktop does not expose API's to create aControlTemplate
from code - which can be worked around via a bit of XAML and a custom attached property, however it also does not exposeTemplatedParent
in any API and it does not setTemplatedParent
for items added in code to a XAML-created ControlTemplate either, which meansControlTemplates
created in code cannot have functioning bindings toTemplatedParent
and no functioningContentPresenter
. With these limitations ControlTemplates are of little value.
Full Changelog: csharpmarkup2-winui-wpf-0-6-14...csharpmarkup2-winui-wpf-0-8-1