/// <summary> /// Invoked when this page is about to be displayed in a Frame. /// </summary> /// <param name="e">Event data that describes how this page was reached. /// This parameter is typically used to configure the page.</param> protected override void OnNavigatedTo(NavigationEventArgs e) { ServerData = (IRCServerData)e.Parameter; if (ServerData != null) { TextBlockName.DataContext = ServerData; } }
/// <summary> /// Invoked when this page is about to be displayed in a Frame. /// </summary> /// <param name="e">Event data that describes how this page was reached. /// This parameter is typically used to configure the page.</param> protected override void OnNavigatedTo(NavigationEventArgs e) { IRCServerData ServerData = (IRCServerData)e.Parameter; if (ServerData != null) { ServerNameTextBox.DataContext = ServerData; ServerUrlTextBox.DataContext = ServerData; } }
private void ServersListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { //// Get the data object that represents the current selected item //IRCServerData ServerData = (sender as ListBox).SelectedItem as IRCServerData; ////Checking whether that it is not null //if (ServerData != null) //{ // ircClient.Connect(ServerData.Url); //} // Get the data object that represents the current selected item IRCServerData ServerData = (sender as ListBox).SelectedItem as IRCServerData; //Checking whether that it is not null if (ServerData != null) { Frame.Navigate(typeof(ServerInfoPage), ServerData); } }