following on this question setting culture, have similar issue application-wide styles.
in pure wpf application, can set these in app.xaml.
however have winforms application being progressively migrated wpf, , contains several wpf usercontrols. there way define application-wide styles applied these components?
** update **
voted close after finding an exact duplicate.
the blog post linked duplicate discusses several options including adding app class build action = page.
different question, similar answer. deriving elementhost
can control resources of elements introduced winforms application. in simplest case can have app.xaml ordinary resource dictionary , when elementhost
child set can set resources resource dictionary. if child element has resources of own can set child's resources new merged dictionary consisting of existing resources , resource dictionary representing application resources.
by dynamically modifying resources of elements added application, can simulate effect of application resources resource dictionary searched after other element-based resources.
Comments
Post a Comment