本文整理汇总了C#中Windows.UI.Xaml.Navigation.NavigationEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# NavigationEventArgs类的具体用法?C# NavigationEventArgs怎么用?C# NavigationEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigationEventArgs类属于Windows.UI.Xaml.Navigation命名空间,在下文中一共展示了NavigationEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if(e.Parameter != null)
{
//we got any parameter, insert it into the textfield
if (MainPage.position > -1)
{
//split string into [0,pos] and [pos+1,end]
// var firstpart = MainPage.code.Substring(0, MainPage.position);
//var secondpart = MainPage.code.Substring(MainPage.position, MainPage.code.Length - firstpart.Length);
//this.textBox.Document.SetText(Windows.UI.Text.TextSetOptions.ApplyRtfDocumentDefaults, firstpart + e.Parameter as string + secondpart);
this.textBox.Document.SetText(Windows.UI.Text.TextSetOptions.ApplyRtfDocumentDefaults, MainPage.code);
//this.textBox.Document.Selection.SetIndex(Windows.UI.Text.TextRangeUnit.Character, MainPage.position, false);
this.textBox.Document.Selection.SetRange(MainPage.position, MainPage.position);
this.textBox.Document.Selection.Text = e.Parameter as String + "\n";
}
else
{
this.textBox.Document.SetText(Windows.UI.Text.TextSetOptions.ApplyRtfDocumentDefaults, MainPage.code + e.Parameter as string + "\n");
}
}
}
开发者ID:18padx08,项目名称:PPTexEditor,代码行数:25,代码来源:MainPage.xaml.cs
示例2: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
history = new HistoriesViewModel();
histories = history.getHistory();
//listViewHistory.Items.Add(histories);
try
{
if (histories != null)
{
foreach (var hist in histories)
{
listViewHistory.Items.Add(hist.ID + " :Used :" + hist.USED_UNITS + " Remained " + hist.REMAINING_UNITS + " DATE: " + hist.DATE + "");
}
}
else
{
messageBox("No history in the database");
}
}
catch (Exception ex)
{
messageBox("error " + ex.Message);
}
base.OnNavigatedTo(e);
}
开发者ID:sovenga,项目名称:ElectricityApp,代码行数:25,代码来源:HistoryPage.xaml.cs
示例3: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
_dataTransferManager = DataTransferManager.GetForCurrentView();
_dataTransferManager.DataRequested += OnDataRequested;
base.OnNavigatedTo(e);
}
开发者ID:mateerladnam,项目名称:DJNanoSampleApp,代码行数:7,代码来源:InstagramDetailPage.cs
示例4: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
_args = e.Parameter as HistoryNavigationArgs;
if(_args == null)
ViewModelLocator.NavMgr.ResetMainBackNav();
base.OnNavigatedTo(e);
}
开发者ID:Mordonus,项目名称:MALClient,代码行数:7,代码来源:HistoryPage.xaml.cs
示例5: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
this.Items = new ObservableCollection<object>(PhotosDataSource.GetItems());
this.ItemTemplate = Resources["Hero"] as DataTemplate;
base.OnNavigatedTo(e);
}
开发者ID:ridomin,项目名称:waslibs,代码行数:7,代码来源:CarouselPage.xaml.cs
示例6: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
Sqlite sqlData = new Sqlite();
var plan = (Plans)e.Parameter;
Days d;
//startDate.Text = "From " + plan.StartDate.Date.ToString("d", DateTimeFormatInfo.InvariantInfo) + " To " + plan.EndDate.Date.ToString("d", DateTimeFormatInfo.InvariantInfo);
startDate.Text = "From " + plan.StartDate.ToString("dd/MM/yyyy") + " To " + plan.EndDate.ToString("dd/MM/yyyy");
location.Text = "in " + plan.Location;
maxDay.Text = plan.MaxDay.ToString();
if (plan.MaxDay == 0)
{
addNewEvent.IsEnabled = false;
}
//DaysList = DayList.getDayList(plan.StartDate, plan.EndDate);
// Initialize date instance
var queryDay = from pd in sqlData.conn.Table<Days>()
where pd.PlanID_FK.Equals(plan.PlanID)
select pd;
// create date if there is no date
if (queryDay.Count<Days>() == 0)
{
for (int i = 1; i <= Convert.ToInt16(maxDay.Text); i++)
{
d = new Days(plan.PlanID, "No Activities on this day!", "Day " + i.ToString());
sqlData.conn.Insert(d);
}
}
DaysList = DayList.getDayList(plan);
}
开发者ID:nhansky,项目名称:TripPlanner,代码行数:32,代码来源:PlanDetails.xaml.cs
示例7: OnNavigatedTo
protected override void OnNavigatedTo( NavigationEventArgs e )
{
base.OnNavigatedTo( e );
Logger.Log( ID, string.Format( "OnNavigatedTo: {0}", e.SourcePageType.Name ), LogType.INFO );
ViewFile( e.Parameter as StorageFile );
}
开发者ID:tgckpg,项目名称:wenku10,代码行数:7,代码来源:DirectTextViewer.xaml.cs
示例8: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
ScrollViewer.SetVerticalScrollMode(CategoryPageGridView, ScrollMode.Disabled);
CategoryPageViewModel categoryPageViewModel =
(CategoryPageViewModel)Resources["CategoryPageViewModel"];
NavigationItem navigationItem = e.Parameter as NavigationItem;
var task = Task.Factory.StartNew(async () =>
{
var bundle = await DownloadNavigationItem(navigationItem.ReferralId);
var navigationItems = await DownloadNavigationItemsAsync();
await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.High,
() =>
{
categoryPageViewModel.Content = bundle.Content[0];
var items = new List<Content>(bundle.Content);
items.RemoveAt(0);
bundle.Content = items.ToArray();
categoryPageViewModel.Bundle = bundle;
categoryPageViewModel.NavigationItems = navigationItems;
LoadingGrid.Visibility = Visibility.Collapsed;
MySplitView.Visibility = Visibility.Visible;
}
);
});
base.OnNavigatedTo(e);
}
开发者ID:arnvanhoutte,项目名称:DeRedactie,代码行数:27,代码来源:CategoryPage.xaml.cs
示例9: OnNavigatedTo
/// <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. The Parameter
/// property is typically used to configure the page.</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
CompositionTarget.SurfaceContentsLost += CompositionTarget_SurfaceContentsLost;
DisplayInformation.GetForCurrentView().DpiChanged += OnDpiChanged;
rootPage.MainPageResized += rootPage_MainPageResized;
UpdateOutputLayout();
}
开发者ID:oldnewthing,项目名称:old-Windows8-samples,代码行数:12,代码来源:Scenario1.xaml.cs
示例10: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
postInfo_list.ItemsSource = CommentList;
pid = (int)e.Parameter;
HttpRequestAsync(async () =>
{
string resourceAddress = postServer + pid;
string responseBody;
HttpResponseMessage response = await httpClient.GetAsync(new Uri(resourceAddress)).AsTask(cts.Token);
responseBody = await response.Content.ReadAsStringAsync().AsTask(cts.Token);
var serializer = new DataContractJsonSerializer(typeof(postInfo)); //将json字符串解析成class
var mStream = new MemoryStream(Encoding.Unicode.GetBytes(responseBody));
postinfo = (postInfo)serializer.ReadObject(mStream);
init_post(postinfo.post);
resourceAddress = commentServer + pid;
response = await httpClient.GetAsync(new Uri(resourceAddress)).AsTask(cts.Token);
responseBody = await response.Content.ReadAsStringAsync().AsTask(cts.Token);
serializer = new DataContractJsonSerializer(typeof(floorInfo)); //将json字符串解析成class
mStream = new MemoryStream(Encoding.Unicode.GetBytes(responseBody));
floors = (floorInfo)serializer.ReadObject(mStream);
init_comment(floors);
return responseBody;
});
}
开发者ID:BLUESTC,项目名称:SeTieba_APP,代码行数:25,代码来源:Post.xaml.cs
示例11: OnNavigatedTo
/// <summary>
/// 在此页将要在 Frame 中显示时进行调用。
/// </summary>
/// <param name="e">描述如何访问此页的事件数据。
/// 此参数通常用于配置页。</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (e.Parameter != null)
{
GetContact(e.Parameter .ToString ());
}
}
开发者ID:745322878,项目名称:Code,代码行数:12,代码来源:EditContact.xaml.cs
示例12: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e) {
if (accounts == null) {
lvAccounts.Visibility = Visibility.Collapsed;
spLVHeader.Visibility = Visibility.Collapsed;
spCreateNewAccount.Visibility = Visibility.Visible;
}
}
开发者ID:AndrejLavrionovic,项目名称:MobAppProject,代码行数:7,代码来源:HomePage.xaml.cs
示例13: OnNavigatedTo
/// <summary>
/// 在此页将要在 Frame 中显示时进行调用。
/// </summary>
/// <param name="e">描述如何访问此页的事件数据。
/// 此参数通常用于配置页。</param>
async protected override void OnNavigatedTo(NavigationEventArgs e)
{
EditAppbar.Visibility = Windows.UI.Xaml.Visibility.Visible;
AddAppbar.Visibility = Windows.UI.Xaml.Visibility.Visible;
FindAppbar.Visibility = Windows.UI.Xaml.Visibility.Visible;
DeleteAppbar.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
//if (e.Parameter != null)
//{
// cityname.city = e.Parameter.ToString();
// cityName.Add(cityname);
//}
//colCityName.ItemsSource = cityName;
Files.Items.Clear();
//创建文件夹
StorageFolder storage = await ApplicationData.Current.LocalFolder.CreateFolderAsync("CityList", CreationCollisionOption.OpenIfExists);
//获取当前文件夹中的文件
var files = await storage.GetFilesAsync();
//便利 每一个文件
foreach (StorageFile file in files)
{
XmlDocument doc=await XmlDocument.LoadFromFileAsync (file );
//cityname.city = doc.DocumentElement.Attributes.GetNamedItem ("city").NodeValue.ToString ();
cityname = new Citys();
cityname.city = file.DisplayName;
if (cityname.city == "City")
continue;
else
cityName.Add(cityname);
}
Files.ItemsSource = cityName;
}
开发者ID:745322878,项目名称:Code,代码行数:39,代码来源:CollectionCity.xaml.cs
示例14: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
var data = e.Parameter as string[];
uid = data[0];
rid = data[1];
LoadData();
}
开发者ID:yszhangyh,项目名称:KuGouMusic-UWP,代码行数:7,代码来源:MyMusicListInfo.xaml.cs
示例15: OnNavigatedTo
protected override async void OnNavigatedTo(NavigationEventArgs navArgs)
{
Debug.WriteLine("MainPage::OnNavigatedTo");
byte adc = 0;
for (int i = 0; i < 50; i++)
{
int readVal = await mcp3008.ReadADC(adc);
// The raw voltage read
float voltage = readVal * SourceVoltage;
voltage /= MaxADCValue;
// Remove the TMP36 .5v offset
voltage -= VoltageOffset;
Debug.WriteLine("Read value: " + readVal.ToString());
var temperatureInC = voltage * 100;
var temperatureInF = temperatureInC * 9 / 5 + 32;
Debug.WriteLine(string.Format("V: {0} C: {1} F: {2}", voltage + VoltageOffset, temperatureInC, temperatureInF));
await Task.Delay(100);
}
}
开发者ID:apdutta,项目名称:prototype,代码行数:25,代码来源:MainPage.xaml.cs
示例16: OnNavigatedFrom
protected override void OnNavigatedFrom(NavigationEventArgs e)
{
base.OnNavigatedFrom(e);
var navigableViewModel = this.DataContext as INavigable;
navigableViewModel?.Deactivated(e.Parameter);
}
开发者ID:pingzing,项目名称:Codeco,代码行数:7,代码来源:BindablePage.cs
示例17: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
TimeViewMama.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm tt");
MainPage.dispatcherTime.Tick += dispatcherTime_Tick;
MainPage.dispatcherTime.Interval = new TimeSpan(0, 0, 30);
MainPage.dispatcherTime.Start();
}
开发者ID:nguyendo94vn,项目名称:MeBe,代码行数:7,代码来源:Mama.xaml.cs
示例18: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
var navigableViewModel = this.DataContext as INavigable;
navigableViewModel?.Activate(e.Parameter, e.NavigationMode);
}
开发者ID:pingzing,项目名称:Codeco,代码行数:7,代码来源:BindablePage.cs
示例19: OnNavigatedTo
/// <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. The Parameter
/// property is typically used to configure the page.</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
this.BottomAppBar.Opened += BottomAppBar_Opened;
this.BottomAppBar.Closed += BottomAppBar_Closed;
HideCommands.IsEnabled = true;
}
开发者ID:ckc,项目名称:WinApp,代码行数:12,代码来源:Scenario6_AppBarAndCommands.xaml.cs
示例20: OnNavigatedTo
protected async override void OnNavigatedTo(NavigationEventArgs e)
{
InboxClient client = new InboxClient("http://inboxdev.cloudapp.net:5555/");
Namespace ns = await client.GetFirstNamespace();
client.Namespace = ns.Namespace_ID;
List<Tag> tags = new List<Tag>(await client.GetTags());
//Tag tag = await client.NewCustomTag("TestInboxApp");
//Tag tag = await client.GetTag("InboxApp");
//Tag tag = tags.Where(t => t.Name == "TestInboxApp").First();
//Tag tag2 = await client.RenameCustomTag(tag.ID, "Other Test");
//List<Thread> threads = new List<Thread>(await client.GetThreads(tag: CanonicalTags.Inbox));
//string[] add_tags = { tag.Name };
//string[] remove_tags = { threads[0].Tags[0].Name };
//await client.UpdateThreadTags(threads[0].ID, "test", "test2");
IEnumerable<Message> messages = await client.GetMessages(tag: CanonicalTags.Inbox, limit: 5);
Message message = null;
Message mess = messages.First();
if (mess.Unread)
{
message = await client.MarkMessageAsRead(mess.ID);
}
else
{
message = await client.MarkMessageAsUnread(mess.ID);
}
}
开发者ID:khamidou,项目名称:inbox.net,代码行数:26,代码来源:MainPage.xaml.cs
注:本文中的Windows.UI.Xaml.Navigation.NavigationEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论