Closed VincentH-Net closed 2 years ago
Btw I am not sure if the XAML string approach is the way to go for WPF. I also saw an example using FrameworkElementFactory
to set the DataTemplate
's VisualTree
I pushed a fix for the XAML load - the data template now contains the child control. However still no visible templates.
It seems the attached property in BuildChild.Id
is not invoked - it is implemented in Delegators.cs
, as far as I can see it follows the MS Guidance
Fixed: a propertyChangedCallback for the attached property is necessary because GetId and SetId are not called by WPF XamlReader
When I use this markup:
And bind to a collection with three items, I can see three empty items of a few pixels high
When I set a breakpoint after
var ui = new Windows.DataTemplate(xaml);
here, theDataTemplate
does not seem to have accepted the XAML - no children loaded.I took over the XAML from the WinUI implementation.
Could you take a look @scottcg ?