本文整理汇总了C#中Microsoft.Practices.Prism.Regions.NavigationContext类的典型用法代码示例。如果您正苦于以下问题:C# NavigationContext类的具体用法?C# NavigationContext怎么用?C# NavigationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigationContext类属于Microsoft.Practices.Prism.Regions命名空间,在下文中一共展示了NavigationContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
string ParametroRecibido = navigationContext.Parameters["TheText"];
// ReceptionTextBox.Text = ParametroRecibido; // este codigo es para una implantación con codebehinde
RecepcionDato = ParametroRecibido;
System.Windows.MessageBox.Show(String.Format("El parametro recibido es :/{0}/", ParametroRecibido));
}
示例2: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
ViewModel = (MediaFileBrowserImagePanelViewModel)navigationContext.Parameters["viewModel"];
DataContext = ViewModel;
ViewModel.OnNavigatedTo(navigationContext);
}
示例3: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
menu = new RTIMainView();
menu.AboutButton.Command = aboutCommand;
ribbonService.AddRibbonItem(menu, true);
}
示例4: OnNavigatedTo
/// <summary>
/// 当前的页面被导航到以后发生,这个函数可以用来处理URI的参数
/// </summary>
/// <param name="navigationContext"></param>
public void OnNavigatedTo(NavigationContext navigationContext)
{
if (TagMsg == null || TagMsg == "")
{
TagMsg = "密码";
}
}
示例5: OnNavigatedFrom
public void OnNavigatedFrom(NavigationContext navigationContext)
{
foreach (var tabItem in _tabs)
{
tabItem.ViewModel.Deinitialize(navigationContext);
}
}
示例6: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
if (navigationContext.Parameters != null && navigationContext.Parameters.Any())
{
var id = (int?) navigationContext.Parameters["Id"];
if (id.HasValue)
{
ViewModel = new DishViewModel(id.Value)
{
Repository = Repository
};
}
else
{
ViewModel = new DishViewModel
{
Repository = Repository
};
}
}
else
ViewModel = new DishViewModel
{
Repository = Repository
};
}
示例7: RaiseNavigating
private void RaiseNavigating(NavigationContext navigationContext)
{
if (this.Navigating != null)
{
this.Navigating(this, new RegionNavigationEventArgs(navigationContext));
}
}
示例8: RegionNavigationEventArgs
/// <summary>
/// Initializes a new instance of the <see cref="RegionNavigationEventArgs"/> class.
/// </summary>
/// <param name="navigationContext">The navigation context.</param>
public RegionNavigationEventArgs(NavigationContext navigationContext)
{
if (navigationContext == null) throw new ArgumentNullException("navigationContext");
Contract.EndContractBlock();
this.NavigationContext = navigationContext;
}
示例9: IsNavigationTarget
public bool IsNavigationTarget(NavigationContext navigationContext)
{
return true;
// If you want to create multiple versions of this view then you need to set the
// PartCreationPolicy to NonShared and write code to determine if the view is
// a navigation target or not.
}
示例10: WhenRegionHasMultipleViews_ThenViewsWithMatchingTypeNameAreConsidered
public void WhenRegionHasMultipleViews_ThenViewsWithMatchingTypeNameAreConsidered()
{
// Arrange
var serviceLocatorMock = new Mock<IServiceLocator>();
var region = new Region();
var view1 = new TestView();
var view2 = "view";
region.Add(view1);
region.Add(view2);
var navigationContext = new NavigationContext(null, new Uri(view2.GetType().Name, UriKind.Relative));
var navigationTargetHandler = new TestRegionNavigationContentLoader(serviceLocatorMock.Object);
// Act
var returnedView = navigationTargetHandler.LoadContent(region, navigationContext);
// Assert
Assert.AreSame(view2, returnedView);
}
示例11: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
ViewModel = (ImageViewModel)navigationContext.Parameters["viewModel"];
DataContext = ViewModel;
ViewModel.OnNavigatedTo(navigationContext);
}
示例12: IsNavigationTarget
public bool IsNavigationTarget( NavigationContext navigationContext )
{
// Called to see if this view can handle the navigation request. If it can, this view is activated.
// This view is always the navigation target so return true.
return true;
}
示例13: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
if (navigationContext.Parameters != null && navigationContext.Parameters.Any())
{
var dishes = navigationContext.Parameters["Dishes"] as List<DishViewModel>;
if (dishes != null)
ViewModel = new OrderViewModel(dishes)
{
Repository = Repository,
NavigationService = navigationContext.NavigationService
};
else
ViewModel = new OrderViewModel
{
Repository = Repository,
NavigationService = navigationContext.NavigationService
};
}
else
ViewModel = new OrderViewModel
{
Repository = Repository,
NavigationService = navigationContext.NavigationService
};
}
示例14: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
_trackMenuBarToken = _eventAggregator.GetEvent<TrackCommandBarEvent>().Subscribe(OnTrackMenuBarEvent, true);
_tracksMenuBarToken = _eventAggregator.GetEvent<TracksCommandBarEvent>().Subscribe(OnTracksMenuBarEvent, true);
Album = navigationContext.Tag as IAlbum;
}
示例15: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
ViewModel = (GeotagFileBrowserViewModel)navigationContext.Parameters["viewModel"];
DataContext = ViewModel;
ViewModel.OnNavigatedTo(navigationContext);
}