Replies: 1 comment
-
It is internal property in avalonia |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When creating an
ItemsControl
, WPF allows to give itsItemsPanel
a full XAML structure and define where to put the elements by setting theIsItemsHost
property on any Panel of that structure.In Avalonia, that property exists but cannot be set by the user, and i don't know if it's even used. It automatically uses the first Panel set in the ItemsPanelTemplate.
It's not critical, since we can instead redefine the ControlTemplate of the
ItemsControl
(and that one is pretty simple), but that requires knowing the template and some copy-pasting. In WPF, we can just define the part we're trying to customize.So, this would work in WPF-style, but in Avalonia it adds the items as children of
Grid
:In Avalonia, we have to redo the entire template:
I couldn't find mention to this in the differences with WPF. Any plan to implement it at some point ? It could be interesting to know how Avalonia XPF handles that.
I also found this SO comment which explains in detail how it works in WPF.
Beta Was this translation helpful? Give feedback.
All reactions