-
Notifications
You must be signed in to change notification settings - Fork 80
[XAML] Modern Adorners #760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Original Branch: https://github.com/michael-hawker/Labs-Windows/tree/llama/adorners/labs/Adorners (This was on an older interation of Labs infrastructure, so would make rebasing/updating branch difficult, easier to just start new component and copy over.) Only changes were to modernize atop latest Toolkit packages instead of including copied helper code. Have more updates to build atop this from XAML Studio after, plus some new updates to API surface, and docs for WPF comparisons.
…ass extension for FrameworkElementExtensions
Includes initial support for adorners to adjust to window/content resizing
Co-authored-by: Ahmed <[email protected]> I had missed the warning from CsWinRT, big thanks to @ahmed605 for helping debug this issue in the Windows App Community Discord!
…th `AdornerLayer` and customization point Add extra info about this to the doc TODO: need to test passing in a custom/subclassed Adorner still
TODO: Need to handle the Tab closing (i.e. AdornedElement unloads/disappears should also detach/remove adorner from AdornerLayer)
|
TabView sample is cool, it works great as there's a ScrollViewer within the tabstrip, it's magic. Though removing the tab dynamically leaves the adorner, so definitely adding handling in the new I want to add a custom adorner sample, seeing how hard it'd be to do a resizer sort of helper (akin to the There's a lot of custom Adorner stuff I was looking at in XAML Studio, so I want to pull this in there to test and muck about with how I think this works now and see if it is easy to use... 😅 |
See discussion for more details: #278
This is my modern Adorners implementation that I started a few years ago, originally here: https://github.com/michael-hawker/Labs-Windows/tree/llama/adorners/labs/Adorners
Since that was in a prior iteration of Labs, I've brought it over atop a new component template base, as well as merging in updates from XAML Studio where I've been using this a bit more already in practical scenarios.
Currently only works for UWP, debugging issue with Windows App SDK... (It used to work here I'm pretty sure, so not sure what's going on, more discussion on Discord: https://discord.com/channels/372137812037730304/672911467401445377/1440605732276801537)- Fixed, thanks @ahmed605!TODO:
Adornerbase class/helperOpen Questions (may not be handled in initial PR):
AdornedElementunloadingIsClipEnabled?GetDesiredTransform? (Should we use transform over Canvas coordinates?)Demo video showing animations with an InfoBadge on a TabViewItem:
XAMLAdornerAnimations.mp4
"Squarer" video with data binding:
XAMLAdornerAnimations2.mp4