I have some object that is instantiated in code behind, for instance, the XAML is called window.xaml and within the window.xaml.cs
protected Dictionary
Make your property "windowname" a DependencyProperty and keep the remaining same.