Replies: 2 comments 1 reply
-
|
It seems the datacontext is not available to the frameworkelementfactory. However, I think there is a simple workaround using selectors:
|
Beta Was this translation helpful? Give feedback.
-
|
I think I got it working using reflection to assign _knownTypeFactory. Then installing a data template is as easy as |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The current template system is taylored for use in xaml and horribly cumbersome in a programmatic context.
How about adding to FrameworkElementFactory a constructor taking as argument a
Func<object, FrameworkElement>, that would be called with the datacontext as argument when generating a control?Beta Was this translation helpful? Give feedback.
All reactions