private void SNSetUp_Click(object sender, RoutedEventArgs e) { UserControl nUserControl = new SetUpSocialNetworkUI(); SetOpenFrame(nUserControl); ContentFrame.Navigate(nUserControl); }
private UserControl openedFrame; //< Reference to opened user control public SocialManagerMain() { InitializeComponent(); // Set images logoImage.Source = PathUtilities.GetImageSource("Logo.png"); LogoutImage.Source = PathUtilities.GetImageSource("Logout.png"); EditProfileImage.Source = PathUtilities.GetImageSource("EditProfile.png"); MainWindow.Title = "Social Manager - " + ClientController.client.Profile.Username; // References to instanciated chats instantiatedChats = new Dictionary <string, Expander>(); // Set timer to check which contacts are online checkFriends = new System.Timers.Timer() { Enabled = true, Interval = 3000 // Check every 3 seconds }; checkFriends.Elapsed += (s, e) => CheckFriends(); UserControl nUserControl = new SetUpSocialNetworkUI(); SetOpenFrame(nUserControl); ContentFrame.Navigate(nUserControl); }