StylesInModel
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
The introduction article is found here: https://blog.mdriven.net/introducing-styles-in-model/ | The introduction article is found here: https://blog.mdriven.net/introducing-styles-in-model/ | ||
To get the StylesInModel styles applied to your WPF application | To get the <span class="col-blue-dark">StylesInModel</span> styles applied to your WPF application, do this to merge the ResourceDictionary: | ||
var stylesinmodelRD = StylesInModelWPF.GenerateResourceDictionaryFromStylesInModel(ViewModelDefinitionsInApplication.GetActionsRuntime(_es.GetType()), wecpof); | var stylesinmodelRD = StylesInModelWPF.GenerateResourceDictionaryFromStylesInModel(ViewModelDefinitionsInApplication.GetActionsRuntime(_es.GetType()), wecpof); | ||
if (stylesinmodelRD != null) | if (stylesinmodelRD != null) |
Revision as of 08:10, 8 October 2024
This page was created by Hans.karlsen on 2020-03-23. Last edited by Hans.karlsen on 2025-05-26.
The introduction article is found here: https://blog.mdriven.net/introducing-styles-in-model/
To get the StylesInModel styles applied to your WPF application, do this to merge the ResourceDictionary:
var stylesinmodelRD = StylesInModelWPF.GenerateResourceDictionaryFromStylesInModel(ViewModelDefinitionsInApplication.GetActionsRuntime(_es.GetType()), wecpof); if (stylesinmodelRD != null) { wecpof.Resources.MergedDictionaries.Add(stylesinmodelRD); }
See also: Theme as data