public DialogOverlayPortalViewModel(IEventAggregator eventAggregator, Func <ActionButtonViewModel> actionButtonFactory) { this.eventAggregator = eventAggregator; Controls = new BindableCollection <ActionButtonViewModel>(); // Create control buttons ActionButtonViewModel button = actionButtonFactory.Invoke(); button.ToolTip = "Close"; button.Icon = (Geometry)Application.Current.FindResource("IconExit"); button.ClickAction = HandleCloseClick; button.ConductWith(this); Controls.Add(button); }
public ImageContentScreenViewModel( IContentPresenter creator, ClipViewModel owner, Action <ContentScreen> releaseFn, ActionButtonViewModel actionButton) : base(creator, owner, releaseFn) { // Create export image button exportImageButton = actionButton; exportImageButton.ToolTip = "Save as file"; exportImageButton.Icon = (Geometry)Application.Current.FindResource("IconExport"); exportImageButton.ClickAction = ExportImage; exportImageButton.ConductWith(this); // Add export button to side controls of the clip Clip.SideControls.Add(exportImageButton); }