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 3282860
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:58:31+00:00 2026-05-17T19:58:31+00:00

I have the following singleton class which contains the following property: public class Manager

  • 0

I have the following singleton class which contains the following property:

public class Manager : INotifyPropertyChanged
{
    public bool IsOnline
    ...

    public static Manager Instance
    ...
}

In the mark-up I am trying to change the color of a button based on this online property:

<Button.Style>
 <Style TargetType="{x:Type Button}">
  <Style.Triggers>
   <DataTrigger Value="True">
    <DataTrigger.Binding>
     <Binding Source="{x:Static storage:Manager.Instance}" Path="IsOnline"/>
    </DataTrigger.Binding>
    <Setter Property="Background" Value="#8000FF00"/>
   </DataTrigger>
  </Style.Triggers>
 </Style>
</Button.Style>

This binding <Binding Source="{x:Static storage:Manager.Instance}" Path="IsOnline"/> fails with the exception:

Cannot convert the value in attribute ‘Source’ to object of type ‘System.Windows.Markup.StaticExtension’.

I have quadruple-checked the “storage” namespace; I know it is both referenced and correct. The Instance property is static, so I do not understand why this binding would fail. I have similar bindings to static properties all over that work just fine.

Any ideas?

  • 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. Editorial Team
    Editorial Team
    2026-05-17T19:58:32+00:00Added an answer on May 17, 2026 at 7:58 pm

    I’ve built a sample app that does exactly what you’re describing, it works with no issues. You can download it here.

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

Sidebar

Related Questions

In PHP, I have following Singleton Database Class: class Database { private static $instance;
I have the following class: class risc { // singleton protected: static unsigned long
I have the following code implementation of my generic singleton provider: public sealed class
I have the following class (which is a JPA entity listener): @Service public class
I have a singleton class which looks a lot like this, public class CfgHandler
I have a singleton class called Manager that holds a list of object instances:
I have the following class which I use to store settings for other objects
I have a Singleton Class which loads some data on its construction. The problem
For example I have DBManager.java Singleton Class, which I have to deploy on clustered
I have a static class which is accessed by multiple remoting and other internal

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.