Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WPF properties.settings and global variables

Status
Not open for further replies.

Leozack

MIS
Oct 25, 2002
867
0
0
GB
Hi all - after banging my head on a winforms project I thought I'd try out WPF.
First problem I ran into is persistant data. It seems I can use Properties.Settings.Default.VarName to get/set any settings I've put in the settings file and this works fine in my main window. But I ahve custom initialisation stuff going on in App.xaml.cs and in there Properties.Settings doesn't exist.
I'm also having a problem finding the simplest way to have global variables as it were - so stuff I work out or get/set from properties.settings can be a avariable available to main window and other forms too. Obviously they could all access the settings (theoretically) but that's not a global variable reference etc.

Any basic help anyone? :( I've spent hours looking and testing /sleep

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top