Application wide settings. RRS feed

  • Question

  • I am working on an application that requires me to set the textblock's default foreground value to some color (say Green). This value should be applied to all the text blocks in the application. But I dont want to go to every text block and set the value since this will be a tedious task to make settings in hundreds of text blocks. Atleast there should be a way to bind the settings to the page atleast. I tried doing it using App.xaml but didnt worked out.

    So, is there an easy way of doing this?

    Thanks in advance for the help.


    Wednesday, October 13, 2010 3:40 AM


  • Hi Rajat. What you want to do is called "explicit styles", and your attempt with app.xaml was a good start. Make sure you follow the instructions here closely, then it will work.

    Wednesday, October 13, 2010 4:20 AM