Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 148681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:00:07+00:00 2026-05-11T09:00:07+00:00

Well i have a application that is black and white and i need a

  • 0

Well i have a application that is black and white and i need a function to lower the brightness how can i do this? all the white comes from a SolidColorBrush that is saved in a ResourceDictionary(Application.xaml), my current solution is to put a empty window that is back with 80% opacity over it but this does not allow me to use the underlying window..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:00:08+00:00Added an answer on May 11, 2026 at 9:00 am

    If all your UI elements are using the same Brush, why not just modify the Brush to reduce the brightness? For example:

    public void ReduceBrightness() {     var brush = Application.Resources('Brush') as SolidColorBrush;     var color = brush.Color;     color.R -= 10;     color.G -= 10;     color.B -= 10;     brush.Color = color; } 

    Edit after your comment on the Brush being frozen:

    If you’re using one of the built-in brushes (via the Brushes class) then it will be frozen. Instead of using one of them, declare your own Brush without freezing it:

    <SolidColorBrush x:Key='Brush'>White</SolidColorBrush> 

    Edit after Robert’s comment on Application-level resources:

    Robert is right. Resources added at the Application level are automatically frozen if they are freezable. Even if you explicitly ask for them not to be frozen:

    <SolidColorBrush x:Key='ForegroundBrush' PresentationOptions:Freeze='False' Color='#000000'/> 

    There are two ways around this that I can see:

    1. As Robert suggested, put the resource at a lower level in the resource tree. For example, in a Window‘s Resources collection. This makes it harder to share though.
    2. Put the resource in a wrapper that is not freezable.

    As an example of #2 consider the following.

    App.xaml:

    <Application.Resources>     <FrameworkElement x:Key='ForegroundBrushContainer'>         <FrameworkElement.Tag>             <SolidColorBrush PresentationOptions:Freeze='False' Color='#000000'/>         </FrameworkElement.Tag>     </FrameworkElement> </Application.Resources> 

    Window1.xaml:

    <StackPanel>     <Label Foreground='{Binding Tag, Source={StaticResource ForegroundBrushContainer}}'>Here is some text in the foreground color.</Label>     <Button x:Name='_button'>Dim</Button> </StackPanel> 

    Window1.xaml.cs:

    public partial class Window1 : Window {     public Window1()     {         InitializeComponent();         _button.Click += _button_Click;     }      private void _button_Click(object sender, RoutedEventArgs e)     {         var brush = (FindResource('ForegroundBrushContainer') as FrameworkElement).Tag as SolidColorBrush;         var color = brush.Color;         color.R -= 10;         color.G -= 10;         color.B -= 10;         brush.Color = color;     } } 

    It’s not as pretty, but it’s the best I can come up with right now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a long-standing application that I'm normally able to compile equally well from
I have a application that runs very well on JBoss using JSF 2. I
Well, here is my problem: I have an application that uses a custom Javascript
I have a VB6 desktop application that is deployed on well over 1200 desktops.
I have a Core Data based mac application that is working perfectly well until
I have an application written in C# that invokes some C code as well.
I have developed an application using postgresql and it works well. Now I need
I have a thread in an application that has a loop like this: ...
I have a application in Fb as well as on website.. I am sending
Well, I have a application which somehow requires some system resources, but how do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.