Based on your answers I solved the Problem like described below. I post it, because i guess that other beginners in WPF could find it useful.
I have singleton class (InfoPool.cs) wich implements INotifyChangedProperty. It's used to provide appwide bindable properties. This class is used by an ObjectDataProvider in App.xaml. So it's very "easy" to bind to a property
InfoPool.cs (the Singleton code is from http://csharpindepth.com/Articles/General/Singleton.aspx 5th Version. I changed the Instance Property to GetInstance() Method, because the OPD needs an Method)
public sealed class InfoPool : INotifyPropertyChanged
{
InfoPool()
{
}
public static InfoPool GetInstance()
{
return Nested.instance;
}
class Nested
{
static Nested()
{
}
internal static readonly InfoPool instance = new InfoPool();
}
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged(PropertyChangedEventArgs e)
{
if (PropertyChanged != null)
{
PropertyChanged(this, e);
}
}
private String strProp = "default String";
private Double dblProp = 1.23456;
public String StrProp
{
get { return strProp; }
set
{
strProp = value;
OnPropertyChanged(new PropertyChangedEventArgs("StrProp"));
}
}
public Double DblProp
{
get { return dblProp; }
set
{
dblProp = value;
OnPropertyChanged(new PropertyChangedEventArgs("DblProp"));
}
}
The ObjectDataProvider in App.xaml
<Application.Resources>
<ResourceDictionary>
<ObjectDataProvider x:Key="OPDInfo" ObjectType="{x:Type local:InfoPool}" MethodName="GetInstance" d:IsDataSource="True"/>
</ResourceDictionary>
</Application.Resources>
An here are 2 ways to bind to the OPD
<StackPanel>
<TextBlock x:Name="tbprop1" Text="{Binding Path=StrProp, Source={StaticResource OPDInfo}}" />
<TextBlock x:Name="tbprop2" Text="{Binding DblProp}" ToolTip="{Binding StrProp}" DataContext="{StaticResource OPDInfo}" />
</StackPanel>
That's it. Please comment, cause I'm new to this ;-)