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


C# Input.DelegateCommand类代码示例

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


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


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