本文整理汇总了C#中System.Windows.Navigation.NavigationEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# NavigationEventArgs类的具体用法?C# NavigationEventArgs怎么用?C# NavigationEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigationEventArgs类属于System.Windows.Navigation命名空间,在下文中一共展示了NavigationEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
plan = GetSeletcedPlan();
bookService = BookService.getInstance();
List<string> pl = new List<string>() { "高", "中", "低" };
this.prioritylist.ItemsSource = pl;
this.prioritylist.SelectedItem = plan.Priority;
this.bookname.Text = plan.Title;
//this.bookname.IsEnabled = false;
this.bookname.IsReadOnly = true;
this.bookname.Foreground = new SolidColorBrush(Color.FromArgb(255, 0, 0, 0));
if (flag)
{
this.datePicker.Value = DateTime.Parse(plan.DatePicker);
this.timepicker.Value = DateTime.Parse(plan.RingTime);
flag = false;
}
this.detail.Text = plan.Detail;
this.toggle.IsChecked = plan.IsReminder;
isRemind = plan.IsReminder;
}
示例2: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string localvalue;
if(NavigationContext.QueryString.TryGetValue("parameter",out localvalue))
name_of_the_person = localvalue;
}
示例3: OnNavigatedFrom
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
if (e.Content is Settings)
(e.Content as Settings).PasswordsUpdated += PasswordPage_PasswordsUpdated;
base.OnNavigatedFrom(e);
}
示例4: OnNavigatedTo
protected override void OnNavigatedTo(
bool cancelled, NavigationEventArgs e)
{
if (cancelled)
return;
_database = Cache.Database;
if (_database == null)
{
this.BackToDBs();
return;
}
string id;
var queries = NavigationContext.QueryString;
if (queries.TryGetValue("entry", out id))
_entry = _database.GetEntry(id);
else
{
id = queries["group"];
_group = _database.GetGroup(id);
}
_target = _database.Root;
Refresh();
}
示例5: OnNavigatedTo
/*
* События страницы
*/
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!poiselectionViewModel.IsDataLoaded)
{
DataContext = LoadPoiSelectionData();
}
}
示例6: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
App currentApp = (App)Application.Current;
this.cityBox.Text = currentApp.Travel.Car.getFuelConsumptionForRouteType(Libs.ChangeRouteTypeTravelEvent.RouteTypes.citi).ToString();
this.mixedBox.Text = currentApp.Travel.Car.getFuelConsumptionForRouteType(Libs.ChangeRouteTypeTravelEvent.RouteTypes.mixed).ToString();
this.hwBox.Text = currentApp.Travel.Car.getFuelConsumptionForRouteType(Libs.ChangeRouteTypeTravelEvent.RouteTypes.hw).ToString();
}
示例7: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
var contextIndex = int.Parse(NavigationContext.QueryString["context"]);
var repoName = NavigationContext.TryGetStringKey("repo");
ViewModel.ContextIndex = contextIndex;
ViewModel.RepoName = repoName;
}
示例8: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (ApiHelper.UserIsLoggedIn())
{
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
}
}
示例9: Browser_Navigated
private void Browser_Navigated(object sender, NavigationEventArgs e)
{
if (e.NavigationMode == NavigationMode.New)
{
_browserHistoryLength++;
}
}
示例10: OnNavigatedTo
protected override void OnNavigatedTo(
bool cancelled, NavigationEventArgs e)
{
_moved = false;
if (cancelled)
{
_moved = true;
return;
}
SourceCapabilityUpdater.Update();
if (AppSettings.Instance.AllowAnalytics == null)
{
_moved = true;
this.NavigateTo<AnalyticsSettings>();
return;
}
Cache.Clear();
var checkTileOpen = e.NavigationMode !=
NavigationMode.Back;
RefreshDbList(checkTileOpen);
}
示例11: OnNavigatedFrom
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
base.OnNavigatedFrom(e);
CallbackManager.currentPage = null;
GC.Collect();
GC.WaitForPendingFinalizers();
}
示例12: OnNavigatedTo
protected async override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
//string id = "";
string id = string.Empty;
if (NavigationContext.QueryString.TryGetValue("id", out id))
{
System.Diagnostics.Debug.WriteLine("ID de la pieza: " + id);
}
HttpClient client = new HttpClient();
string json = await client.GetStringAsync(new Uri("http://museosapp.azurewebsites.net/Piezas/"+id));
_piezas = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Piezas>>(json);
//Piezas piezas = NavigateServiceExtends.GetNavigationData(NavigationService) as Piezas;
//System.Diagnostics.Debug.WriteLine("PIEZAAAAAAA: " + piezas.descripcion);
//piezas.descripcion;
//Ésta línea trae toda la información del museo que se ha seleccionado en otro xaml.
// Y la muestra en el xaml actual.
//this.DataContext = piezas;
ElementosQR.ItemsSource = _piezas;
loadPieza.Visibility = Visibility.Collapsed;
txtCargando.Visibility = Visibility.Collapsed;
}
示例13: OnNavigatedTo
// Load data for the ViewModel Items
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
if (!ViewModel.IsSignedIn)
{
await ViewModel.TryLoginAsync();
}
if (ContentPanorama.SelectedItem == RecentReadingItem && !ViewModel.IsRecentDataLoaded)
{
await ViewModel.UpdateRecentViewAsync();
}
else if (ContentPanorama.SelectedItem == SeriesIndexItem && !ViewModel.IsIndexDataLoaded)
{
await ViewModel.LoadSeriesIndexDataAsync();
}
else if (ContentPanorama.SelectedItem == RecommandItem && !ViewModel.IsRecommandLoaded)
{
await ViewModel.LoadRecommandDataAsync();
}
else if (ContentPanorama.SelectedItem == FavoriteSection && !ViewModel.IsFavoriteLoaded)
{
await ViewModel.LoadUserFavouriateAsync();
}
//else if (ContentPanorama.SelectedItem == UserRecentSection && !ViewModel.IsUserRecentLoaded)
//{
// await ViewModel.LoadUserRecentAsync();
//}
}
示例14: OnNavigatedTo
// Load data for the ViewModel Items
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!App.ViewModel.IsDataLoaded)
{
App.ViewModel.LoadData();
}
}
示例15: WebBrowser1_LoadCompleted
private void WebBrowser1_LoadCompleted(object sender, NavigationEventArgs e)
{
if (e.Uri.ToString().IndexOf("access_token", StringComparison.Ordinal) != -1)
{
string accessToken = String.Empty;
int userId = 0;
var regex = new Regex(@"(?<name>[\w\d\x5f]+)=(?<value>[^\x26\s]+)", RegexOptions.IgnoreCase | RegexOptions.Singleline);
foreach (Match match in regex.Matches(e.Uri.ToString()))
{
if (match.Groups["name"].Value == "access_token")
{
accessToken = match.Groups["value"].Value;
}
else if (match.Groups["name"].Value == "user_id")
{
userId = Convert.ToInt32(match.Groups["value"].Value);
}
}
_token = new Token {AccessToken = accessToken, UserId = userId};
var groupWindow = new GroupWindow();
groupWindow.AccessToken.Content = _token.AccessToken;
groupWindow.UserID.Content = _token.UserId;
groupWindow.Show();
this.Close();
}
}