public MainWindow()
        {
            InitializeComponent();
            PropertyTree properties = WorldProperties.PropertyTree;

            foreach (string name in properties.treeBranches.Keys)
            {
                PropertiesTree.Items.Add(CreateTreeViewItemFor(properties.treeBranches[name], name));
            }
            ReadPersistedExpandedItems();

            var userPrefs = new UserPreferences();

            this.Height      = userPrefs.WindowHeight;
            this.Width       = userPrefs.WindowWidth;
            this.Top         = userPrefs.WindowTop;
            this.Left        = userPrefs.WindowLeft;
            this.WindowState = userPrefs.WindowState;

            SetTitle();
        }