public DemoAppBar() { DefaultStyleKey = typeof(DemoAppBar); ExpandButtonClickCommand = new DevExpress.Mvvm.DelegateCommand(ExpandButtonClickCommandExecute); RenderTransform = new TranslateTransform(); SizeChanged += OnSizeChanged; }
public ReportExplorerViewModel() { LoadDocumentCommand = new DevExpress.Mvvm.DelegateCommand(OnLoadDocumentCommand); AvailableReports = new List <ReportItemViewModel> { new ReportItemViewModel { DisplayName = "Multicolumn Report", ReportName = "XtraReportsDemos.MulticolumnReport.Report, DevExpress.DemoReports.v14.2", Parameters = new MulticolumnParametersViewModel() }, new ReportItemViewModel { DisplayName = "Master-Detail Report", ReportName = "XtraReportsDemos.MasterDetailReport.Report, DevExpress.DemoReports.v14.2", Parameters = new EmptyParametersViewModel() }, new ReportItemViewModel { DisplayName = "Merged Report", ReportName = "XtraReportsDemos.ReportMerging.MergedReport, DevExpress.DemoReports.v14.2", Parameters = new EmptyParametersViewModel() }, new ReportItemViewModel { DisplayName = "Table Report", ReportName = "XtraReportsDemos.TableReport.Report, DevExpress.DemoReports.v14.2", Parameters = new TableReportParametersViewModel() }, new ReportItemViewModel { DisplayName = "Subreport", ReportName = "XtraReportsDemos.Subreports.MasterReport, DevExpress.DemoReports.v14.2", Parameters = new SubreportParametersViewModel() }, }; SelectedReport = AvailableReports.First(); OnLoadDocumentCommand(); }
public async Task <UICommand> ShowAsync() { Popup = new Popup(); Popup.Width = Window.Current.CoreWindow.Bounds.Width; Popup.Height = Window.Current.CoreWindow.Bounds.Height; Window.Current.CoreWindow.SizeChanged += CoreWindow_SizeChanged; Result = null; DialogResultCommand = new DevExpress.Mvvm.DelegateCommand <object>(OnDialogResult); List <DialogButtonViewModel> buttons = new List <DialogButtonViewModel>(); foreach (UICommand command in CommandsSource) { buttons.Add(new DialogButtonViewModel(command, DialogResultCommand)); } Buttons = buttons; Popup.Child = this; Width = Popup.Width; Height = Popup.Height; KeyDown += DialogContentControl_KeyDown; Popup.VerticalOffset = 0; Popup.HorizontalOffset = 0; Popup.IsOpen = true; Focus(FocusState.Programmatic); await WaitPopupClosing(); return(Result); }
public SimplePadViewModel() { CutCommand = new DevExpress.Mvvm.DelegateCommand <TextBox>(Cut, CanCut); CopyCommand = new DevExpress.Mvvm.DelegateCommand <TextBox>(Copy, CanCopy); PasteCommand = new DevExpress.Mvvm.DelegateCommand <TextBox>(Paste, CanPaste); DeleteCommand = new DevExpress.Mvvm.DelegateCommand <TextBox>(Delete, CanDelete); SelectAllCommand = new DevExpress.Mvvm.DelegateCommand <TextBox>(SelectAll, CanSelectAll); TextAlignmentCommand = new DevExpress.Mvvm.DelegateCommand <TextAlignment>(SetTextAlignment); }
public SchedulerViewModel() { Appointments = new ObservableCollection <ModelAppointment>(); Resources = new ObservableCollection <ModelResource>(); AddNewAppointmentCommand = new DevExpress.Mvvm.DelegateCommand <object>(AddNewAppointmentCommandExecute); GetSourceObjectCommand = new DevExpress.Mvvm.DelegateCommand <object>(GetSourceObjectCommandExecute); AddTestData(); }
public BarCodeEmployeesViewModel() { Accounts = new ObservableCollectionCore <Employe>(); if (DesignMode.DesignModeEnabled) { Accounts.Add(new Employe(FeatureDemo.Data.DataStorage.Employees[0])); } else { for (int i = 0; i < 10; i++) { Accounts.Add(new Employe(FeatureDemo.Data.DataStorage.Employees[i])); } } SelectedEmploye = Accounts[0]; PrintCommand = new DevExpress.Mvvm.DelegateCommand(PrintDocument); }
public MainWindow() { InitializeComponent(); ViewModel = new MainWindowViewModel(); ViewModel.FileSystemItemAdded += ehFileSystemItemAdded; ViewModel.FileSystemItemDeleted += ehFileSystemItemDeleted; ViewModel.FileSystemItemProcessed += ehFileSystemItemProcessed; ViewModel.FolderSizeCalculated += ehFolderSizeCalculated; DataContext = this; ScanFolderCommand = new DevExpress.Mvvm.DelegateCommand(ScanFolder); StopProfilingCommand = new DevExpress.Mvvm.DelegateCommand(StopProfiling); Loaded += ehLoaded; updateTimer = new Timer(); updateTimer.Interval = 1000; updateTimer.Elapsed += this.UpdateTimer_Elapsed; changes = new ConcurrentQueue <NodeChange>(); }
public async Task <UICommand> ShowAsync() { Popup = new Popup(); Popup.Width = Window.Current.CoreWindow.Bounds.Width; Popup.Height = Window.Current.CoreWindow.Bounds.Height; Window.Current.CoreWindow.SizeChanged += CoreWindow_SizeChanged; Result = null; DialogResultCommand = new DevExpress.Mvvm.DelegateCommand <object>(OnDialogResult); Buttons = CreateButtons(ButtonsContents, CommandsSource); Popup.Child = this; Width = Popup.Width; Height = Popup.Height; KeyDown += DialogContentControl_KeyDown; Popup.VerticalOffset = 0; Popup.HorizontalOffset = 0; Popup.IsOpen = true; Focus(FocusState.Programmatic); await WaitPopupClosing(); return(Result); }
public async Task<UICommand> ShowAsync() { Popup = new Popup(); Popup.Width = Window.Current.CoreWindow.Bounds.Width; Popup.Height = Window.Current.CoreWindow.Bounds.Height; Window.Current.CoreWindow.SizeChanged += CoreWindow_SizeChanged; Result = null; DialogResultCommand = new DevExpress.Mvvm.DelegateCommand<object>(OnDialogResult); List<DialogButtonViewModel> buttons = new List<DialogButtonViewModel>(); foreach(UICommand command in CommandsSource) { buttons.Add(new DialogButtonViewModel(command, DialogResultCommand)); } Buttons = buttons; Popup.Child = this; Width = Popup.Width; Height = Popup.Height; KeyDown += DialogContentControl_KeyDown; Popup.VerticalOffset = 0; Popup.HorizontalOffset = 0; Popup.IsOpen = true; Focus(FocusState.Programmatic); await WaitPopupClosing(); return Result; }
public async Task<UICommand> ShowAsync() { Popup = new Popup(); Popup.Width = Window.Current.CoreWindow.Bounds.Width; Popup.Height = Window.Current.CoreWindow.Bounds.Height; Window.Current.CoreWindow.SizeChanged += CoreWindow_SizeChanged; Result = null; DialogResultCommand = new DevExpress.Mvvm.DelegateCommand<object>(OnDialogResult); Buttons = CreateButtons(ButtonsContents, CommandsSource); Popup.Child = this; Width = Popup.Width; Height = Popup.Height; KeyDown += DialogContentControl_KeyDown; Popup.VerticalOffset = 0; Popup.HorizontalOffset = 0; Popup.IsOpen = true; Focus(FocusState.Programmatic); await WaitPopupClosing(); return Result; }