D
DanThMan
This seems like it should be so simple, but I'm just not having much
luck with this. I have an constant in my App.xaml.cs file (i.e., code-
behind) called Name.
public const string Name = "Dan";
And now, I want a Label on my Window1.xaml page that shows the Name. I
will eventually want to show the same Name on other pages. So, I want
to be able to access (bind to?) this global constant from anywhere in
the project.
I've read up on x:Static, static resources, and different ways of
binding data to XAML properties, but so far, no combination of these
techniques seems to work. What is the best way to store and access
constants in XAML that apply to the whole project?
Thanks for you help,
-Dan
luck with this. I have an constant in my App.xaml.cs file (i.e., code-
behind) called Name.
public const string Name = "Dan";
And now, I want a Label on my Window1.xaml page that shows the Name. I
will eventually want to show the same Name on other pages. So, I want
to be able to access (bind to?) this global constant from anywhere in
the project.
I've read up on x:Static, static resources, and different ways of
binding data to XAML properties, but so far, no combination of these
techniques seems to work. What is the best way to store and access
constants in XAML that apply to the whole project?
Thanks for you help,
-Dan