当前位置: 首页>>代码示例>>C#>>正文


C# INavigator.Navigate方法代码示例

本文整理汇总了C#中INavigator.Navigate方法的典型用法代码示例。如果您正苦于以下问题:C# INavigator.Navigate方法的具体用法?C# INavigator.Navigate怎么用?C# INavigator.Navigate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在INavigator的用法示例。


在下文中一共展示了INavigator.Navigate方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ComponentViewModel

 public ComponentViewModel(string componentId, INavigator navigator, string componentDescription, IEnumerable<string> serviceDescriptions)
 {
     _description = componentDescription;
     if (serviceDescriptions.Any())
         _services += "–o " + string.Join(", ", serviceDescriptions);
     GoToComponent = new RelayCommand(() => navigator.Navigate<string, ComponentDetailView>(componentId));
 }
开发者ID:mustafatig,项目名称:whitebox,代码行数:7,代码来源:ComponentViewModel.cs

示例2: OpenSideMenuMenuCommand

 public OpenSideMenuMenuCommand(INavigator navigator, ISessionManager sessionManager,IImageManager imageManager, IApiClient apiClient)
 {
     _sessionManager = sessionManager;
     _imageManager = imageManager;
     _apiClient = apiClient;
     ExecuteCommand = new RelayCommand(arg => navigator.Navigate(Go.To.SideMenu()));
 }
开发者ID:TomGillen,项目名称:MBT,代码行数:7,代码来源:OpenSideMenuCommand.cs

示例3: MovieSpotlightViewModel

        public MovieSpotlightViewModel(Task<MoviesView> moviesViewTask, IImageManager imageManager, INavigator navigator, IApiClient apiClient, IServerEvents serverEvents,
                                       IPlaybackManager playbackManager, ISessionManager sessionManager, ILogManager logManager)
        {
            _imageManager = imageManager;
            _navigator = navigator;
            _apiClient = apiClient;
            _serverEvents = serverEvents;
            _playbackManager = playbackManager;
            _sessionManager = sessionManager;
            _logger = logManager.GetLogger("Movies Spotlight");
            SpotlightHeight = HomeViewModel.TileHeight*2 + HomeViewModel.TileMargin*2;
            SpotlightWidth = 16*(SpotlightHeight/9) + 100;
            _miniSpotlightWidth = HomeViewModel.TileWidth + (HomeViewModel.TileMargin/4) - 1;

            LowerSpotlightWidth = SpotlightWidth/2 - HomeViewModel.TileMargin;
            LowerSpotlightHeight = HomeViewModel.TileHeight;

            BrowseMoviesCommand = new RelayCommand(arg => {
                var itemParams = new ItemListParameters { 
                    Items = GetMovies(),
                    Title = "Browse Movies"
                };

                navigator.Navigate(Go.To.ItemList(itemParams));

                //await navigator.Navigate(Go.To.Item(await _apiClient.GetPersonAsync("Chris Pine", sessionManager.CurrentUser.Id)));
            });

            SpotlightViewModel = new ItemSpotlightViewModel(imageManager, apiClient) {
                ImageType = ImageType.Backdrop,
                ItemSelectedAction = i => navigator.Navigate(Go.To.Item(i))
            };

            AllMoviesImagesViewModel = new ImageSlideshowViewModel(imageManager, Enumerable.Empty<string>()) {
                ImageStretch = Stretch.UniformToFill
            };

            MiniSpotlightItems = new RangeObservableCollection<ItemTileViewModel> {
                CreateMiniSpotlightItem(),
                CreateMiniSpotlightItem(),
                CreateMiniSpotlightItem(),
            };

            LoadViewModels(moviesViewTask);
        }
开发者ID:TomGillen,项目名称:MBT,代码行数:45,代码来源:MovieSpotlightViewModel.cs

示例4: ItemTileViewModel

        public ItemTileViewModel(IApiClient apiClient, IImageManager imageManager, IServerEvents serverEvents,
                                 INavigator navigator, IPlaybackManager playbackManager, BaseItemDto item)
        {
            _imageManager = imageManager;
            _navigator = navigator;
            _playbackManager = playbackManager;
            _item = item;

            Image = new ItemArtworkViewModel(item, apiClient, imageManager);
            Image.PreferredImageTypes = new[] { ImageType.Primary, ImageType.Thumb, ImageType.Backdrop };
            Image.EnforcePreferredImageAspectRatio = true;
            Image.PropertyChanged += (senger, args) => {
                if (args.PropertyName == "Size") {
                    OnPropertyChanged("Size");
                    OnPropertyChanged("ShowDisplayName");
                }
            };

            DisplayNameGenerator = GetDisplayNameWithAiredSpecial;
            GoToDetailsCommand = new RelayCommand(async o => navigator.Navigate(Go.To.Item(Item)));
            PlayCommand = new RelayCommand(o => _playbackManager.Play(new PlayOptions(Item) { GoFullScreen = true, EnableCustomPlayers = true, Resume = true }));

            serverEvents.UserDataChanged += serverEvents_UserDataChanged;
        }
开发者ID:TomGillen,项目名称:MBT,代码行数:24,代码来源:ItemTileViewModel.cs

示例5: Navigate

        internal virtual bool Navigate(INavigator navigator, NavigationMode navMode)
        { 
            Debug.Assert(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);

            // This is fallback functionality if somebody creates a JournalEntry and gives it a URI.
            if (this.Source != null) 
            {
                return navigator.Navigate(Source, new NavigateInfo(Source, navMode, this)); 
            } 
            else
            { 
                Invariant.Assert(false, "Cannot navigate to a journal entry that does not have a Source.");
                return false;
            }
        } 
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:15,代码来源:JournalEntry.cs

示例6: Navigate

        /// <summary>
        /// This override is used when doing journal navigation to a PF, not when it is resumed after
        /// a child PF finishes.
        /// </summary>
        internal override bool Navigate(INavigator navigator, NavigationMode navMode)
        {
            Debug.Assert(navMode == NavigationMode.Back || navMode == NavigationMode.Forward);

            // Resume the PF and navigate to it.
            // Special case: doing fragment navigation or CustomContentState navigation
            // within a PF. Then don't create a new PF object!
            IDownloader idl = navigator as IDownloader;
            NavigationService ns = idl != null ? idl.Downloader : null;
            Debug.Assert(ns != null, "Fragment navigation won't work when the INavigator doesn't have a NavigationService.");

            PageFunctionBase pageFunction =
                (ns != null && ns.ContentId == this.ContentId) ?
                (PageFunctionBase)ns.Content : ResumePageFunction();

            Debug.Assert(pageFunction != null);

            return navigator.Navigate(pageFunction, new NavigateInfo(this.Source, navMode, this));
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:23,代码来源:Journaling.cs

示例7: HomeCommand

 public HomeCommand(INavigator navigator)
 {
     ExecuteCommand = new RelayCommand(arg => navigator.Navigate(Go.To.Home()));
 }
开发者ID:TomGillen,项目名称:MBT,代码行数:4,代码来源:HomeCommand.cs

示例8: NavigateMapper

 private static bool NavigateMapper(ReceiverList<INavigator, NavigationParameter> list, INavigator receiver, NavigationParameter parameter)
 {
     return receiver.Navigate(parameter);
 }
开发者ID:WinUP,项目名称:WADV,代码行数:4,代码来源:Receivers.cs

示例9: SearchMenuCommand

 public SearchMenuCommand(INavigator navigator)
 {
     ExecuteCommand = new RelayCommand(arg => navigator.Navigate(Go.To.Search()));
 }
开发者ID:TomGillen,项目名称:MBT,代码行数:4,代码来源:SearchCommand.cs


注:本文中的INavigator.Navigate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。