Class ShowPropertyPicture
- Namespace
- CADability.GeoObject
- Assembly
- CADability.dll
Property entry that shows and edits a Picture in the property grid: the location, the width and height (optionally keeping the aspect ratio of the bitmap), the two direction vectors (optionally kept perpendicular), the file path and the attributes. Location and directions have hotspots in the drawing area. It is returned by GetShowProperties(IFrame).
public class ShowPropertyPicture : PropertyEntryImpl, IPropertyEntry, IShowProperty, ICommandHandler, IGeoObjectShowProperty, IDisplayHotSpots
- Inheritance
-
ShowPropertyPicture
- Implements
- Inherited Members
Constructors
ShowPropertyPicture(Picture, IFrame)
Creates the property entry for the picture picture.
public ShowPropertyPicture(Picture picture, IFrame frame)
Parameters
Properties
Flags
Implementation of Flags: the derived class states what the entry is and what the user can do with it. The flags must match the overridden members, e.g. HasSubEntries requires SubItems, ValueEditable requires Value and EndEdit(bool, bool, string), DropDown requires GetDropDownList() and ListBoxSelected(int).
public override PropertyEntryType Flags { get; }
Property Value
SubItems
Must be overridden, when Flags contains PropertyEntryType.HasSubEntries. See SubItems
public override IPropertyEntry[] SubItems { get; }
Property Value
Methods
Added(IPropertyPage)
Implementation of Added(IPropertyPage): memorizes the page in propertyPage and reports Added. Override it to subscribe to events while the entry is displayed, and call the base implementation.
public override void Added(IPropertyPage propertyTreeView)
Parameters
propertyTreeViewIPropertyPage
Opened(bool)
Implementation of Opened(bool): reports OpenSubEntries or CollapseSubEntries and, when the entry was opened, makes it the Parent of its SubItems and passes ReadOnly on to them.
public override void Opened(bool isOpen)
Parameters
isOpenbooltrue: the entry was opened, false: it was closed
ReloadProperties()
public void ReloadProperties()
Removed(IPropertyPage)
Implementation of Removed(IPropertyPage): closes the undo context of the project (an edit may have been interrupted by removing the entry), reports Removed and forgets the page. Override it to unsubscribe from events, and call the base implementation.
public override void Removed(IPropertyPage propertyTreeView)
Parameters
propertyTreeViewIPropertyPage
Events
HotspotChangedEvent
Raised when the hotspots of this entry (location and directions of the picture) are to be shown, hidden, selected or deselected: when the entry is opened or closed and when one of its sub-entries is selected. The handler gets the hotspot and the kind of change, see IDisplayHotSpots.
public event HotspotChangedDelegate HotspotChangedEvent