Answer the question
In order to leave comments, you need to log in
How to properly store and use styles in WPF?
Hello! I am new to programming.
If I understand correctly, then styles for wpf are like css for html.
In that case, I have a question. Do I need to put all styles for elements into a separate xaml file (ResourceDictionary.xaml), including styles that are applied to one element, so as not to clutter up the main file with styling code? Or put in a separate file only those styles that apply to several elements?
Share your experience. How to store and use styles correctly?
Answer the question
In order to leave comments, you need to log in
Well, I select for styles in a separate file or files (if various options are required). You can, of course, immediately in the main file. But this turned out to be impractical for me and makes it difficult to transfer to another project when I need the same style within a project. And besides, when all styles are stored in a separate file, you always know where to look for it and make a couple of edits if you don’t like something.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question