本文整理汇总了C#中System.Windows.Navigation.NavigationEventArgs.GetNavigatingParameter方法的典型用法代码示例。如果您正苦于以下问题:C# NavigationEventArgs.GetNavigatingParameter方法的具体用法?C# NavigationEventArgs.GetNavigatingParameter怎么用?C# NavigationEventArgs.GetNavigatingParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Navigation.NavigationEventArgs
的用法示例。
在下文中一共展示了NavigationEventArgs.GetNavigatingParameter方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode != NavigationMode.Back)
{
this.pageAction = this.GetNavigatingParameter("pageAction", null).ToEnum<PageActionType>(PageActionType.Add);
this.CategoryClassType = this.GetNavigatingParameter("CategoryClassType", null).ToEnum<ItemType>(ItemType.Expense);
string source = e.GetNavigatingParameter("id", null);
if (this.pageAction == PageActionType.Edit)
{
this.LoadEditingObject(source.ToGuid());
}
else
{
this.LoadAddingObject(source.ToGuid());
}
}
}
示例2: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode != NavigationMode.Back)
{
string id = e.GetNavigatingParameter("id", null);
this.pageAction = e.GetNavigatingParameter("action", null).ToEnum<PageActionType>();
if (this.pageAction == PageActionType.Add)
{
this.Current = new Account();
this.CategoryManagementPageTitle.Text = LocalizedStrings.GetCombinedText(AppResources.Create, AppResources.AccountName, false).ToUpperInvariant();
}
else
{
this.Current = this.accountViewModel.Accounts.FirstOrDefault<Account>(p => p.Id == id.ToGuid());
this.CategoryManagementPageTitle.Text = LocalizedStrings.GetCombinedText(AppResources.Edit, AppResources.AccountInfo, false).ToUpperInvariant();
this.LoadEditing();
}
this.DataContext = this;
}
}
示例3: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode != NavigationMode.Back)
{
int num = e.GetNavigatingParameter("goto", null).ToInt32();
this.MainPivot.SelectedIndex = num;
}
}
示例4: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode != NavigationMode.Back)
{
this._loaningTpyeToSearch = e.GetNavigatingParameter("type").ToInt32().ToEnum<LeanType>();
}
}
示例5: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
this.EnsureEnablePinToStart();
MainPage.ShowOpactityZeroTrayBlack();
base.OnNavigatedTo(e);
if (!this.isDataNavigated)
{
this.totalDaysOfThisMonth = System.DateTime.Now.GetCountDaysOfMonth();
this.SetControlLocalizedString();
this.AccountName.ItemsSource = ViewModelLocator.AccountViewModel.Accounts;
if (base.NavigationContext.QueryString.ContainsKey("action"))
{
string str = base.NavigationContext.QueryString["action"];
if (!ViewModelLocator.AccountViewModel.IsDataLoaded)
{
ViewModelLocator.AccountViewModel.QuickLoadData();
}
if (!this.hasNavied)
{
if ((str == "Edit") || (IsSelectionMode && (accountItemForSchedule != null)))
{
this.actionType = PageActionType.Edit;
this.CategoryType.BorderThickness = new Thickness(0.0, 0.0, 0.0, 0.0);
this.initializeEditingMode();
base.DataContext = currentEditObject;
}
else
{
if (base.NavigationContext.QueryString.ContainsKey("categoryType"))
{
int num = int.Parse(base.NavigationContext.QueryString["categoryType"]);
this.CategoryType.SelectedIndex = num;
}
this.actionType = PageActionType.Add;
if (str != "preEdit")
{
currentEditObject = new AccountItem();
}
base.DataContext = currentEditObject;
this.InitializeAddData();
if (str == "preEdit")
{
this.BindData(currentEditObject);
}
}
if (str == "selection")
{
string source = e.GetNavigatingParameter("title", null);
this.NewOrEditPage.Text = source.IsNullOrEmpty() ? AppResources.CreateAccountItemForSchedule.ToUpperInvariant() : source;
}
this.SetControls();
this.hasNavied = true;
}
}
this.isFromList = this.GetNavigatingParameter("isFromList", null).ToBoolean(false);
this.fromMainPage = this.GetNavigatingParameter("FromMainPlus", null).ToBoolean(false);
if (this.FromStartScreen)
{
ApplicationBarMenuItem item = new ApplicationBarMenuItem
{
Text = LocalizedStrings.GetLanguageInfoByKey("GoToMainPage")
};
this.toMainPageButton = item;
this.toMainPageButton.Click += new System.EventHandler(this.toMainPageButton_Click);
base.ApplicationBar.MenuItems.Add(this.toMainPageButton);
}
}
}
示例6: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (BudgetManager.Current.NeedUpdate)
{
ViewModelLocator.BudgetProjectViewModel.UpdateCurrentMonthBudgetSummary();
}
if (e.NavigationMode != NavigationMode.Back)
{
this._toPivotIndex = e.GetNavigatingParameter("toIndex", 0)
.ToInt32();
}
}
示例7: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode != NavigationMode.Back)
{
this.CurrencySymbol = e.GetNavigatingParameter("currency");
this.CurrentNotes = e.GetNavigatingParameter("currencyNotes");
}
}
示例8: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (e.NavigationMode != NavigationMode.Back)
{
this._id = e.GetNavigatingParameter("id").ToGuid();
this._action = e.GetNavigatingParameter("action").ToEnum<PageActionType>();
System.Threading.ThreadPool.QueueUserWorkItem((o) =>
{
if (_action == PageActionType.Edit)
{
var item = ViewModelLocator.NotificationsViewModel.Notifications.FirstOrDefault(p => p.Id == _id);
if (item != null)
{
Current = item;
}
}
this.Dispatcher.BeginInvoke(() =>
{
if (_action == PageActionType.Add)
{
Current = new TallySchedule();
Current.StartTime = DateTime.Now.AddSeconds(20);
Current.EndTime = DateTime.Now.AddYears(1);
}
else
{
this.EnableAlarmNotification.IsEnabled = false;
this.PageTitle.Text = AppResources.Edit.ToLower();
}
this.DataContext = Current;
});
});
}
base.OnNavigatedTo(e);
}
示例9: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
this.EnsureEnablePinToStart();
if (e.NavigationMode != NavigationMode.Back)
{
this._specifiedAccountId = e.GetNavigatingParameter("specifiedAccount")
.ToGuid();
}
base.OnNavigatedTo(e);
}
示例10: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode != NavigationMode.Back)
{
this.pageAction = e.GetNavigatingParameter("action", null).ToEnum<PageActionType>();
if (this.pageAction == PageActionType.Add)
{
this.DataEditing = new TallySchedule();
}
else if (EditingItemGetter != null)
{
this.DataEditing = EditingItemGetter();
this.associatedAccountItem = this.DataEditing.ReBuildAccountItem();
this.BindingDataToEdit();
}
this.title = LocalizedStrings.GetCombinedText((this.pageAction == PageActionType.Add) ? AppResources.Create : AppResources.Edit, AppResources.TallyTemplate, false).ToLowerInvariant();
this.PageTitle.Text = this.title;
}
}
示例11: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode != NavigationMode.Back)
{
this._pageNextGoTo = e.GetNavigatingParameter("pageNextGoTo");
}
}
示例12: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode != NavigationMode.Back)
{
this.LoadTemplete(e.GetNavigatingParameter("id", null).ToGuid());
}
}