本文整理汇总了C#中Microsoft.Practices.Prism.Regions.NavigationContext类的典型用法代码示例。如果您正苦于以下问题:C# NavigationContext类的具体用法?C# NavigationContext怎么用?C# NavigationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavigationContext类属于Microsoft.Practices.Prism.Regions命名空间,在下文中一共展示了NavigationContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
}
开发者ID:llenroc,项目名称:Inflexion2,代码行数:7,代码来源:ModuleAWorkSpaceViewModel2.cs
示例2: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
ViewModel = (MediaFileBrowserImagePanelViewModel)navigationContext.Parameters["viewModel"];
DataContext = ViewModel;
ViewModel.OnNavigatedTo(navigationContext);
}
开发者ID:iejeecee,项目名称:mediaviewer,代码行数:7,代码来源:MediaFileBrowserImagePanelView.xaml.cs
示例3: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
menu = new RTIMainView();
menu.AboutButton.Command = aboutCommand;
ribbonService.AddRibbonItem(menu, true);
}
开发者ID:mahdimousavi,项目名称:DarkStorm-Desktop,代码行数:7,代码来源:MainVM.cs
示例4: OnNavigatedTo
/// <summary>
/// 当前的页面被导航到以后发生,这个函数可以用来处理URI的参数
/// </summary>
/// <param name="navigationContext"></param>
public void OnNavigatedTo(NavigationContext navigationContext)
{
if (TagMsg == null || TagMsg == "")
{
TagMsg = "密码";
}
}
开发者ID:wybq68,项目名称:DIH_LUMBARROBAT,代码行数:11,代码来源:LoginViewModel.cs
示例5: OnNavigatedFrom
public void OnNavigatedFrom(NavigationContext navigationContext)
{
foreach (var tabItem in _tabs)
{
tabItem.ViewModel.Deinitialize(navigationContext);
}
}
开发者ID:kms,项目名称:torshify-client,代码行数:7,代码来源:ArtistViewModel.cs
示例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
};
}
开发者ID:saaleksandrov,项目名称:SuChief,代码行数:26,代码来源:AddDishView.xaml.cs
示例7: RaiseNavigating
private void RaiseNavigating(NavigationContext navigationContext)
{
if (this.Navigating != null)
{
this.Navigating(this, new RegionNavigationEventArgs(navigationContext));
}
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:7,代码来源:RegionNavigationService.cs
示例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;
}
开发者ID:xperiandri,项目名称:PortablePrism,代码行数:11,代码来源:RegionNavigationEventArgs.cs
示例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.
}
开发者ID:modulexcite,项目名称:PrismExample,代码行数:7,代码来源:ViewTwoViewModel.cs
示例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);
}
开发者ID:selvendiranj,项目名称:compositewpf-copy,代码行数:28,代码来源:LocatorNavigationTargetHandlerFixture.cs
示例11: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
ViewModel = (ImageViewModel)navigationContext.Parameters["viewModel"];
DataContext = ViewModel;
ViewModel.OnNavigatedTo(navigationContext);
}
开发者ID:iejeecee,项目名称:mediaviewer,代码行数:7,代码来源:ImageView.xaml.cs
示例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;
}
开发者ID:smbdieng,项目名称:.net-examples,代码行数:7,代码来源:DetailsViewModel.cs
示例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
};
}
开发者ID:saaleksandrov,项目名称:SuChief,代码行数:27,代码来源:OrderView.xaml.cs
示例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;
}
开发者ID:kms,项目名称:torshify-client,代码行数:7,代码来源:AlbumViewModel.cs
示例15: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
ViewModel = (GeotagFileBrowserViewModel)navigationContext.Parameters["viewModel"];
DataContext = ViewModel;
ViewModel.OnNavigatedTo(navigationContext);
}
开发者ID:iejeecee,项目名称:mediaviewer,代码行数:7,代码来源:GeotagFileBrowserView.xaml.cs
示例16: WhenViewExistsAndDoesNotImplementINavigationAware_ThenReturnsView
public void WhenViewExistsAndDoesNotImplementINavigationAware_ThenReturnsView()
{
// Arrange
var serviceLocatorMock = new Mock<IServiceLocator>();
var region = new Region();
var view = new TestView();
region.Add(view);
var navigationContext = new NavigationContext(null, new Uri(view.GetType().Name, UriKind.Relative));
var navigationTargetHandler = new TestRegionNavigationContentLoader(serviceLocatorMock.Object);
// Act
var returnedView = navigationTargetHandler.LoadContent(region, navigationContext);
// Assert
Assert.AreSame(view, returnedView);
}
开发者ID:selvendiranj,项目名称:compositewpf-copy,代码行数:26,代码来源:LocatorNavigationTargetHandlerFixture.cs
示例17: OnNavigatedTo
public void OnNavigatedTo(NavigationContext navigationContext)
{
ViewModel = (MediaFileStackPanelViewModel)navigationContext.Parameters["viewModel"];
DataContext = ViewModel;
if (ViewModel == null)
{
collapseableGrid.Visibility = System.Windows.Visibility.Collapsed;
collapseableButtonGrid.Visibility = System.Windows.Visibility.Collapsed;
return;
}
else
{
Binding binding = new Binding();
binding.Path = new PropertyPath("IsEnabled");
binding.Converter = new BooleanToVisibilityConverter();
binding.Source = ViewModel;
BindingOperations.SetBinding(collapseableButtonGrid, Grid.VisibilityProperty, binding);
binding = new Binding();
binding.Path = new PropertyPath("IsVisible");
binding.Converter = new BooleanToVisibilityConverter();
binding.Source = ViewModel;
BindingOperations.SetBinding(collapseableGrid, Grid.VisibilityProperty, binding);
}
if (ViewModel.IsEnabled == false) return;
ViewModel.MediaStateCollectionView.Cleared += MediaStateCollectionView_Cleared;
ViewModel.OnNavigatedTo(navigationContext);
}
开发者ID:iejeecee,项目名称:mediaviewer,代码行数:35,代码来源:MediaFileStackPanelView.xaml.cs
示例18: OnNavigatedFrom
public void OnNavigatedFrom(NavigationContext navigationContext)
{
if (ViewModel != null)
{
ViewModel.MediaStateCollectionView.Cleared -= MediaStateCollectionView_Cleared;
ViewModel.OnNavigatedFrom(navigationContext);
}
}
开发者ID:iejeecee,项目名称:mediaviewer,代码行数:8,代码来源:MediaFileStackPanelView.xaml.cs
示例19: IsNavigationTarget
public bool IsNavigationTarget( NavigationContext navigationContext )
{
// Called to see if this view can handle the navigation request. If it can, this view is activated.
// Check the ID of the currently displayed item against the ID navigation parameter.
string id = navigationContext.Parameters["ID"];
return CurrentItem == null ? false : CurrentItem.Id.Equals( id );
}
开发者ID:smbdieng,项目名称:.net-examples,代码行数:8,代码来源:EditViewModel.cs
示例20: ConfirmNavigationRequest
public void ConfirmNavigationRequest(NavigationContext navigationContext, Action<bool> continuationCallback)
{
bool result = true;
// TODO: Implement code to set result ...
continuationCallback(result);
}
开发者ID:miseeger,项目名称:SharpDevelop.Templates,代码行数:8,代码来源:ViewModel1.cs
注:本文中的Microsoft.Practices.Prism.Regions.NavigationContext类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论