internal static void UpdateSelectableIfActive(PropertyContainer container) { if (instance == null) return; if (instance.activeContainer != container) return; LoggingService.Debug("UpdateSelectableIfActive"); instance.SetSelectableObjects(container.SelectableObjects); }
internal static void UpdateSelectedObjectIfActive(PropertyContainer container) { if (instance == null) return; if (instance.activeContainer != container) return; LoggingService.Debug("UpdateSelectedObjectIfActive"); if (container.SelectedObjects != null) instance.SetDesignableObjects(container.SelectedObjects); else instance.SetDesignableObject(container.SelectedObject); }
void SetActiveContainer(PropertyContainer pc) { if (activeContainer == pc) return; if (pc == null) return; activeContainer = pc; UpdateHostIfActive(pc); UpdateSelectedObjectIfActive(pc); UpdateSelectableIfActive(pc); }
internal static void UpdatePropertyGridReplacementContent(PropertyContainer container) { if (instance == null) return; if (instance.activeContainer != container) return; //LoggingService.Debug("UpdatePropertyGridReplacementControl"); if (container.PropertyGridReplacementContent != null) { instance.contentControl.SetContent(container.PropertyGridReplacementContent); } else { instance.contentControl.SetContent(instance.panel); } }
internal static void UpdateHostIfActive(PropertyContainer container) { if (instance == null) return; if (instance.activeContainer != container) return; LoggingService.Debug("UpdateHostIfActive"); if (instance.host == container.Host) return; if (instance.host != null) instance.RemoveHost(instance.host); if (container.Host != null) instance.SetDesignerHost(container.Host); }
void SetActiveContainer(PropertyContainer pc) { if (activeContainer == pc) return; if (pc == null) pc = emptyContainer; activeContainer = pc; UpdateHostIfActive(pc); UpdateSelectedObjectIfActive(pc); UpdateSelectableIfActive(pc); UpdatePropertyGridReplacementContent(pc); }
internal static void UpdatePropertyGridReplacementControl(PropertyContainer container) { if (instance == null) return; if (instance.activeContainer != container) return; //LoggingService.Debug("UpdatePropertyGridReplacementControl"); if (container.PropertyGridReplacementControl != null) { if (!instance.panel.Controls.Contains(container.PropertyGridReplacementControl)) { instance.panel.Controls.Clear(); container.PropertyGridReplacementControl.Dock = DockStyle.Fill; instance.panel.Controls.Add(container.PropertyGridReplacementControl); } } else { if (!instance.panel.Controls.Contains(instance.grid)) { instance.panel.Controls.Clear(); instance.panel.Controls.Add(instance.grid); instance.panel.Controls.Add(instance.comboBox); } } }