protected virtual void OnToggleCheckedChanged(string propertyName, bool isChecked) { if (this is ServiceDesignerViewModel && propertyName == "ShowLarge") { if (isChecked) { ActivityDesignerToggle activityDesignerToggle = TitleBarToggles.FirstOrDefault(c => c.AutomationID == "HelpToggle"); if (activityDesignerToggle == null) { //AddTitleBarHelpToggle(); } } else { RemoveHelpToggle(); } } var isSelectedOrMouseOver = IsSelectedOrMouseOver; var showSmall = ShowSmall; ThumbVisibility = isSelectedOrMouseOver && !showSmall ? Visibility.Visible : Visibility.Collapsed; ConnectorVisibility = isSelectedOrMouseOver && showSmall ? Visibility.Visible : Visibility.Collapsed; if (!isChecked) { PreviousView = propertyName; } ClearErrors(); }
protected void AddTitleBarQuickVariableInputToggle() { var toggle = ActivityDesignerToggle.Create("pack://application:,,,/Dev2.Activities.Designers;component/Images/ServiceQuickVariableInput-32.png", "Close Quick Variable Input", "pack://application:,,,/Dev2.Activities.Designers;component/Images/ServiceQuickVariableInput-32.png", "Open Quick Variable Input", "QuickVariableInputToggle", this, ShowQuickVariableInputProperty ); TitleBarToggles.Add(toggle); }
protected void AddTitleBarHelpToggle() { var toggle = ActivityDesignerToggle.Create("pack://application:,,,/Dev2.Activities.Designers;component/Images/ServiceHelp-32.png", "Close Help", "pack://application:,,,/Dev2.Activities.Designers;component/Images/ServiceHelp-32.png", "Open Help", "HelpToggle", this, ShowHelpProperty ); TitleBarToggles.Add(toggle); }
protected void AddTitleBarQuickVariableInputToggle() { var toggle = ActivityDesignerToggle.Create("ServiceQuickVariableInput", "Close Quick Variable Input", "ServiceQuickVariableInput", "Open Quick Variable Input", "QuickVariableInputToggle", this, ShowQuickVariableInputProperty ); TitleBarToggles.Add(toggle); }
protected void RemoveHelpToggle() { ActivityDesignerToggle activityDesignerToggle = TitleBarToggles.FirstOrDefault(c => c.AutomationID == "HelpToggle"); if (activityDesignerToggle != null) { TitleBarToggles.Remove(activityDesignerToggle); ShowHelp = false; } }
void AddTitleBarEditToggle() { // ReSharper disable RedundantArgumentName var toggle = ActivityDesignerToggle.Create("ServicePropertyEdit", "Edit", "ServicePropertyEdit", "Edit", "ShowParentToggle", autoReset: true, target: this, dp: ShowParentProperty ); // ReSharper restore RedundantArgumentName TitleBarToggles.Add(toggle); }
public void Dispose() { TitleBarToggles.Clear(); _modelItem.PropertyChanged -= OnModelItemPropertyChanged; OnDispose(); CEventHelper.RemoveAllEventHandlers(this); CEventHelper.RemoveAllEventHandlers(TitleBarToggles); CEventHelper.RemoveAllEventHandlers(ModelItem); GC.SuppressFinalize(this); }
void AddTitleBarEditToggle() { // ReSharper disable RedundantArgumentName var toggle = ActivityDesignerToggle.Create("pack://application:,,,/Dev2.Activities.Designers;component/Images/ServicePropertyEdit-32.png", "Edit", "pack://application:,,,/Dev2.Activities.Designers;component/Images/ServicePropertyEdit-32.png", "Edit", "ShowParentToggle", autoReset: true, target: this, dp: ShowParentProperty ); // ReSharper restore RedundantArgumentName TitleBarToggles.Add(toggle); }