C# WPF Xaml: Globally set all text in a view to one color, and all backgrounds to another -


is there way (using data binding or xaml) set background of elements in view 1 color, , text another?

i know can edit each element in view 1 one, i'd see if possible settings @ global level. kind of how default set black on white.

i guess i'm asking if there feature/setting of wpf application offers i'm looking for, and/or should search find answer online.

my project isn't using visual studio offers when create wpf project, can't use prism or mvvm light approach.

thanks in advance answer!

globally...or xaml... if there feature/setting of wpf application offers i'm looking for

in application resource add style this:

<style targettype="control">   <setter property="background" value ="blue"/>   <setter property="foreground" value ="red"/> </style> <style targettype="textblock">   <setter property="background" value ="blue"/>   <setter property="foreground" value ="red"/> </style> 

based on target element want set background.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -