From the original version of the question:
I declared it static, since I will need only one available instance of the class for the entire application.
This is not what a static class is. You can never have an instance of a static class.
Although you have now modified the question to refer to the lack of instances, a single instance is indeed probably the best idea, since binding through the data context is more instance oriented.
What you're probably looking for is a singleton where you can instantiate, and most members are members of the instance, but where there is guaranteed to be only one instance.
You can make singleton very easy:
public sealed class Singleton { private static readonly Singleton instance = new Singleton(); public static Singleton Instance { get { return instance; } }
There are various implementation options, of course - see my related page for more examples.
Then you must set the DataContext to reference the singleton instance. (I assume this is easy enough in WPF - it has been too long since I did it.)
Without this single instance, the only thing you could set for your DataContext would be the type itself - and if WPF is not configured specifically to retrieve the static members of the type referenced when the context is set to the type, I don't see it working.
source share