• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Input.DelegateCommand类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Input.DelegateCommand的典型用法代码示例。如果您正苦于以下问题:C# DelegateCommand类的具体用法?C# DelegateCommand怎么用?C# DelegateCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DelegateCommand类属于System.Windows.Input命名空间,在下文中一共展示了DelegateCommand类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: BattlesViewModel

 public BattlesViewModel()
 {
     AddActionCommand = new DelegateCommand(AddAction);
     DeleteActionCommand = new DelegateCommand(DeleteAction);
     ClearActionsCommand = new DelegateCommand(ClearActions);
     ViewName = "Battles";
 }
开发者ID:EasyFarm,项目名称:EasyFarm,代码行数:7,代码来源:BattlesViewModel.cs


示例2: ComplexCustomViewViewModel

        public ComplexCustomViewViewModel( Model model )
        {
            Model = model;

            ShowConfirmationCommand = new DelegateCommand( OnShowConfirmation );
            ConfirmationRequest = new InteractionRequest<INotification>();
        }
开发者ID:JackWangCUMT,项目名称:Plainion,代码行数:7,代码来源:ComplexCustomViewViewModel.cs


示例3: AddEditPropertyListNameViewModel

        public AddEditPropertyListNameViewModel(AddEditPropertyListNameDialog view, PropertyListName propertyListName, CommonUtils.Operation operation)
        {
            View = view;
            mPropertyListName = propertyListName;

            OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanModifyConfig);
            CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, x => true);

            if (operation == CommonUtils.Operation.Update)
            {
                CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                cmsWebServiceClient.GetPropertyListNameCompleted +=
                    (s1, e1) =>
                    {
                        mPropertyListName = e1.Result;
                        LoadPropertyListNames(mPropertyListName.PropertyListId);
                        mExistingPropertyListNamesLoaded = true;
                        FireLoaded();
                    };
                cmsWebServiceClient.GetPropertyListNameAsync(mPropertyListName.Id);
            }
            else
            {
                LoadPropertyListNames(mPropertyListName.PropertyListId);
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:27,代码来源:AddEditPropertyListNameViewModel.cs


示例4: CredentialModelView

 public CredentialModelView()
 {
     Users = new ObservableCollection<CredentialUser>();
     RefreshCommand = new DelegateCommand(RefreshUsers);
     SaveCommand = new DelegateCommand<PasswordBox>(SaveObject);
     RefreshUsers();
 }
开发者ID:tablesmit,项目名称:CredentialChanger,代码行数:7,代码来源:CredentialModelView.cs


示例5: FlyoutService

        public FlyoutService(IRegionManager regionManager, IApplicationCommands applicationCommands)
        {
            _regionManager = regionManager;

            ShowFlyoutCommand = new DelegateCommand<string>(ShowFlyout, CanShowFlyout);
            applicationCommands.ShowFlyoutCommand.RegisterCommand(ShowFlyoutCommand);
        }
开发者ID:steve600,项目名称:VersatileMediaManager,代码行数:7,代码来源:FlyoutService.cs


示例6: AddEditMobilePlantComponentTypeViewModel

        public AddEditMobilePlantComponentTypeViewModel(MobilePlantComponentType mct)
        {
            mMobilePlantComponentType = mct;

            OkButtonCommand = new DelegateCommand<object>(OkButtonHander, CanModifyConfig);
            CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, x => true);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:7,代码来源:AddEditMobilePlantComponentTypeViewModel.cs


示例7: RegionWithPopupWindowActionExtensionsViewModel

        public RegionWithPopupWindowActionExtensionsViewModel( Model model )
        {
            Model = model;

            ShowConfirmationCommand = new DelegateCommand( OnShowConfirmation );
            ConfirmationRequest = new InteractionRequest<INotification>();
        }
开发者ID:JackWangCUMT,项目名称:Plainion,代码行数:7,代码来源:RegionWithPopupWindowActionExtensionsViewModel.cs


示例8: ShellViewModel

        public ShellViewModel()
        {
            SetVisibilityOfNavigationBack();
            SystemNavigationManager.GetForCurrentView().BackRequested += SystemNavigationManager_BackRequested;

            OpenPaneCommand = new DelegateCommand(OpenPaneCommandDelegate);
        }
开发者ID:GeekyTheory,项目名称:GeekyBlogs,代码行数:7,代码来源:ShellViewModel.cs


示例9: MainWindow

 public MainWindow()
 {
     InitializeComponent();
     OpenHelpPageCommand = new DelegateCommand(ExecuteOpenHelpPage);
     this.DataContext = OpenHelpPageCommand;
     this.InputBindings.Add(new KeyBinding(this.OpenHelpPageCommand, new KeyGesture(Key.F1)));
 }
开发者ID:NathanEWhitaker,项目名称:xaml-sdk,代码行数:7,代码来源:MainWindow.xaml.cs


示例10: WeighDataCamerasPresenter

        public WeighDataCamerasPresenter(ModalViewManager modal, IEventAggregator eventAgrigator)
        {
            _modalManager = modal;
            _eventAgrigator = eventAgrigator;

            CloseMeCommand = new DelegateCommand<object>(CloseMe);
        }
开发者ID:Minatron,项目名称:Minatron,代码行数:7,代码来源:WeighDataCamerasPresenter.cs


示例11: MainPageViewModel

        /// <summary>
        /// Initializes the services and commands.
        /// </summary>
        /// <param name="bibleRepository">A repository of <see cref="Bible"/>.</param>
        /// <param name="navigationService">A implementation of Navigation</param>
        public MainPageViewModel(IBibleRepository bibleRepository, INavigationService navigationService)
        {
            _bibleRepository = bibleRepository;

            LoadChaptersCommand = new DelegateCommand<Book>(LoadChapters);
            ShowChapterCommand = new DelegateCommand<Chapter>(ShowChapter);
        }
开发者ID:RafaelPlantard,项目名称:GodWord,代码行数:12,代码来源:MainPageViewModel.cs


示例12: RegionOnPopupWindowContentControlViewModel

        public RegionOnPopupWindowContentControlViewModel( Model model )
        {
            Model = model;

            ShowConfirmationCommand = new DelegateCommand( OnShowConfirmation );
            ConfirmationRequest = new InteractionRequest<INotification>();
        }
开发者ID:JackWangCUMT,项目名称:Plainion,代码行数:7,代码来源:RegionOnPopupWindowContentControlViewModel.cs


示例13: SearchResultsPageViewModel

        public SearchResultsPageViewModel(ApplicationSettings settings, INavigationService navigationService, IImageSearchService imageSearchService, IHub hub, IAccelerometer accelerometer, IStatusService statusService, IShareDataRequestedPump shareMessagePump)
        {
            _settings = settings;
            _navigationService = navigationService;
            _imageSearchService = imageSearchService;
            _hub = hub;
            _accelerometer = accelerometer;
            _statusService = statusService;

            HomeCommand = _navigationService.GoBackCommand;
            ViewDetailsCommand = new DelegateCommand(ViewDetails, () => SelectedImage != null);
            LoadMoreCommand = new AsyncDelegateCommand(LoadMore);
            ThumbnailViewCommand = new DelegateCommand(ThumbnailView);
            ListViewCommand = new DelegateCommand(ListView);
            SplitViewCommand = new DelegateCommand(SplitView);
            SettingsCommand = new DelegateCommand(Settings);

            AddImages(_settings.SelectedInstance.Images);
            shareMessagePump.DataToShare = _settings.SelectedInstance.QueryLink;
            _statusService.Title = _settings.SelectedInstance.Query;
            _accelerometer.Shaken += accelerometer_Shaken;
            _navigationService.Navigating += NavigatingFrom;

            UpdateCurrentView(CurrentView);
            _hub.Send(new UpdateTileImageCollectionMessage(_settings.SelectedInstance));
        }
开发者ID:schmidp,项目名称:GettingStartedWithMetroApps,代码行数:26,代码来源:SearchResultsPageViewModel.cs


示例14: CompareFilesViewModel

 public CompareFilesViewModel(ReadOnlyObservableCollection<HexFileViewModel> files)
 {
     this.files = files;
     CloseCommand = new DelegateCommand(OnClose);
     IndexOfTheSelectedLeftFile = 0;
     IndexOfTheSelectedRightFile = 1;
 }
开发者ID:KiselevKN,项目名称:BootMega,代码行数:7,代码来源:CompareFilesViewModel.cs


示例15: InitializeCommands

 private void InitializeCommands()
 {
     NewAlbumCommand = new DelegateCommand(NewAlbum);
     DeleteAlbumCommand = new DelegateCommand(DeleteSelectedAlbum);
     EditAlbumCommand = new DelegateCommand(EditSelectedAlbum);
     PowerShellConsoleCommand = new DelegateCommand(_powerShellConsoleLauncher.Launch);
 }
开发者ID:hugodahl,项目名称:powershell-for-developers,代码行数:7,代码来源:AlbumListViewModel.cs


示例16: RecentViewModel

        public RecentViewModel()
        {
            fetchMoreDataCommand = new DelegateCommand(
                obj =>
                {
                    ThreadPool.QueueUserWorkItem(
                        delegate
                        {
                            /* This is just to demonstrate a slow operation. */
                            Thread.Sleep(10000);
                            /* We invoke back to the UI thread. */
                            Deployment.Current.Dispatcher.BeginInvoke(
                                delegate
                                {
                                    GlobalLoading.Instance.IsLoading = true;

                                    foreach (PictureInfo p in App.ContinuedRecentPictures)
                                    {
                                        App.RecentPictures.Add(p);
                                    }

                                    App.ContinuedRecentPictures.Clear();

                                    GlobalLoading.Instance.IsLoading = false;
                                });
                        });

                });
        }
开发者ID:purdue-cs-groups,项目名称:cs307-project01,代码行数:29,代码来源:RecentViewModel.cs


示例17: ContentViewModel

 protected ContentViewModel(AbstractWorkspace workspace, ICommandManager commandManager, ILoggerService logger)
 {
     _workspace = workspace;
     _commandManager = commandManager;
     _logger = logger;
     CloseCommand = new DelegateCommand(CloseDocument);
 }
开发者ID:vinodj,项目名称:Wide,代码行数:7,代码来源:ContentViewModel.cs


示例18: LoginViewModel

        public LoginViewModel(IEventAggregator eventAggregator, ISecurity security)
        {
            EventAggregator = eventAggregator;
            _security = security;

            LoginCommand = new DelegateCommand(DoLogin);
        }
开发者ID:qwertylolman,项目名称:Stocktaking,代码行数:7,代码来源:LoginViewModel.cs


示例19: EditTaskViewModel

 public EditTaskViewModel(ObservableCollection<Task> tasks, ObservableCollection<TaskList> tasksList)
 {
     _tasks = tasks;
     _taskLists = tasksList;
     ValidateEditionCommand = new DelegateCommand(OnValidateEdition);
     DeleteTaskCommand = new DelegateCommand(OnDeleteTask);
 }
开发者ID:salfab,项目名称:Open-Todo,代码行数:7,代码来源:EditTaskViewModel.cs


示例20: ExpensesViewModel

 /// <summary>
 /// Initializes a new instance of the <see cref="ExpensesViewModel"/> class.
 /// </summary>
 /// <param name="container">The container.</param>
 public ExpensesViewModel(IUnityContainer container)
     : base(container)
 {
     Edit = new DelegateCommand<object>(OnEdit);
     Create = new DelegateCommand<object>(OnCreate);
     LoadExpenses();
 }
开发者ID:RookieOne,项目名称:GreekFire,代码行数:11,代码来源:ExpensesViewModel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Input.ExecutedRoutedEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Input.Cursor类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap