//}]}
        public ShellViewModel(IMenuNavigationService menuNavigationService)
        {
//^^
//{[{
            MenuFilewts.ItemNameCommand = new DelegateCommand(OnMenuFilewts.ItemName);
//}]}
        }
        public ShellViewModel(IMenuNavigationService menuNavigationService)
        {
            _menuNavigationService = menuNavigationService;
//{[{
            _navigationService = navigationService;
            _identityService   = identityService;
//}]}
        }
Beispiel #3
0
        public WebViewViewModel(IMenuNavigationService menuNavigationService, IEventAggregator eventAggregator, IDialogService dialogService)
        {
            BookmarksVisibility    = Visibility.Collapsed;
            WebViewVisibility      = Visibility.Visible;
            _menuNavigationService = menuNavigationService;
            _eventAggregator       = eventAggregator;
            _dialogService         = dialogService;
            IsLoading                 = true;
            Bookmarks                 = new ObservableCollection <Bookmark>();
            WebViewSource             = new Uri(WebHelper.Url);
            BrowserBackCommand        = new DelegateCommand(() => _webViewService?.GoBack(), () => _webViewService?.CanGoBack ?? false);
            BrowserForwardCommand     = new DelegateCommand(() => _webViewService?.GoForward(), () => _webViewService?.CanGoForward ?? false);
            RefreshCommand            = new DelegateCommand(() => _webViewService?.Refresh());
            RetryCommand              = new DelegateCommand(Retry);
            MenuViewsBookmarksCommand = new DelegateCommand(MenuViewsBookmarksCommand_);
            SearchTextBoxCommand      = new DelegateCommand(SearchTextBoxCommand_);
            AddToBookmarkCommand      = new DelegateCommand(AddToBookmarkCommand_);
            MenuFileSettingsCommand   = new DelegateCommand(OnMenuFileSettings);
            OpenHistoryCommand        = new DelegateCommand(OpenHistoryCommand_);
            ItemClickCommand          = new DelegateCommand <Bookmark>(ItemClickCommand_);
            LoadBookmarks();

            // Note that the WebViewService is set from within the view because it needs a reference to the WebView control
        }
Beispiel #4
0
 public ShellViewModel(IMenuNavigationService menuNavigationService, IEventAggregator eventAggregator)
 {
     _menuNavigationService  = menuNavigationService;
     MenuViewsWebViewCommand = new DelegateCommand(OnMenuViewsWebView);
     eventAggregator.GetEvent <OpenRightMenuEvent>().Subscribe(OnMenuFileSettings);
 }
Beispiel #5
0
 public ShellViewModel(IMenuNavigationService menuNavigationService)
 {
     _menuNavigationService = menuNavigationService;
     MenuFileExitCommand    = new DelegateCommand(OnMenuFileExit);
 }