WPF: how to import resource from child element
I would like to define two similar views of some graph data. One view is an editor and the other is a viewer that shows the converted data. I'm not sure what the best way to exchange codes and resources between the two views is, but I tentatively decided to make a UserControl to represent the portion of the visual that is common between the two.
It is most convenient to store Styles and ControlTemplates as UserControl resources, but as in XAML I can use the style defined in the UserControl in one of the views (where the UserControl is a child of the view)
a source to share
If you use this type as your template keyword, there is no way to have both at the same time. However, if you want to add some kind of manipulation / enumeration mechanism for different types of graphical views.
Also, the graphical data is abstracted as a tree of objects, and if so, won't the DataTemplates switch anymore?
a source to share