Class Style
A Style is a collection of several attributes like Layer, LineWidth
that can be collectively set to an GeoObject.
Inheritance
System.Object
Style
Implements
System.ICloneable
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
[Serializable]
[ComVisible(true)]
[Guid("5FC3B97D-716E-496B-AAB6-2891ABF1F248")]
[ClassInterface(ClassInterfaceType.AutoDual)]
public class Style : IShowPropertyImpl, IShowProperty, IPropertyEntry, ICloneable, ISerializable, INamedAttribute, IColorDef, ILayer, ILineWidth, ILinePattern, IHatchStyle, IDimensionStyle, ICommandHandler, IJsonSerialize
Constructors
|
Improve this Doc
View Source
Style()
Declaration
|
Improve this Doc
View Source
Style(SerializationInfo, StreamingContext)
Constructor required by deserialization
Declaration
protected Style(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
SerializationInfo
|
| System.Runtime.Serialization.StreamingContext |
context |
StreamingContext
|
|
Improve this Doc
View Source
Style(String)
Declaration
public Style(string name)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
Properties
|
Improve this Doc
View Source
ColorDef
Declaration
public ColorDef ColorDef { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public override MenuWithHandler[] ContextMenu { get; }
Property Value
Overrides
|
Improve this Doc
View Source
DefaultFor
Declaration
public Style.EDefaultFor DefaultFor { get; set; }
Property Value
|
Improve this Doc
View Source
DimensionStyle
Declaration
public DimensionStyle DimensionStyle { get; set; }
Property Value
|
Improve this Doc
View Source
EntryType
Declaration
public override ShowPropertyEntryType EntryType { get; }
Property Value
Overrides
|
Improve this Doc
View Source
HatchStyle
Declaration
public HatchStyle HatchStyle { get; set; }
Property Value
|
Improve this Doc
View Source
LabelText
Declaration
public override string LabelText { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
|
Improve this Doc
View Source
LabelType
Declaration
public override ShowPropertyLabelFlags LabelType { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Layer
Declaration
public Layer Layer { get; set; }
Property Value
|
Improve this Doc
View Source
LinePattern
Declaration
public LinePattern LinePattern { get; set; }
Property Value
|
Improve this Doc
View Source
LineWidth
Declaration
public LineWidth LineWidth { get; set; }
Property Value
|
Improve this Doc
View Source
Name
The name of the Style. Different Styles in the same list must have different names.
Declaration
public string Name { get; set; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Parent
The StyleList that contains this Style. May be null.
Declaration
public StyleList Parent { get; set; }
Property Value
|
Improve this Doc
View Source
SubEntries
Overrides SubEntries,
returns the subentries in this property view.
Declaration
public override IShowProperty[] SubEntries { get; }
Property Value
Overrides
|
Improve this Doc
View Source
SubEntriesCount
Overrides SubEntriesCount,
returns the number of subentries in this property view.
Declaration
public override int SubEntriesCount { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
Overrides
Methods
|
Improve this Doc
View Source
Added(IPropertyPage)
Declaration
public override void Added(IPropertyPage propertyTreeView)
Parameters
Overrides
|
Improve this Doc
View Source
Apply(IGeoObject)
Applies this style to the given GeoObject. Since the style knows better about the different
kinds of interfaces and attributes, this is implemented in the Style class not in IGeoObjectImpl.
Declaration
public void Apply(IGeoObject go)
Parameters
| Type |
Name |
Description |
| IGeoObject |
go |
the GeoObject which is to be modified
|
|
Improve this Doc
View Source
Check(IGeoObject)
Checks whether the given GeoObject accords to this style
Declaration
public bool Check(IGeoObject go)
Parameters
| Type |
Name |
Description |
| IGeoObject |
go |
the GeoObject to check
|
Returns
| Type |
Description |
| System.Boolean |
true, if all attributes are the same as given in the style
|
|
Improve this Doc
View Source
Clone()
Declaration
Returns
|
Improve this Doc
View Source
GetDefault()
Returns a default (empty) Style. Use this function if you need a Style
and dont have access to a StyleList.
Declaration
public static Style GetDefault()
Returns
| Type |
Description |
| Style |
The default Stalye
|
|
Improve this Doc
View Source
GetObjectData(SerializationInfo, StreamingContext)
Implements System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
The System.Runtime.Serialization.SerializationInfo to populate with data.
|
| System.Runtime.Serialization.StreamingContext |
context |
The destination (System.Runtime.Serialization.StreamingContext) for this serialization.
|
|
Improve this Doc
View Source
IsDefaultFor(Style.EDefaultFor)
Declaration
public bool IsDefaultFor(Style.EDefaultFor toTest)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
LabelChanged(String)
Declaration
public override void LabelChanged(string NewText)
Parameters
| Type |
Name |
Description |
| System.String |
NewText |
|
Overrides
|
Improve this Doc
View Source
Removed(IPropertyTreeView)
Declaration
public override void Removed(IPropertyTreeView propertyTreeView)
Parameters
| Type |
Name |
Description |
| IPropertyTreeView |
propertyTreeView |
the IPropertyTreeView from which it was removed
|
Overrides
|
Improve this Doc
View Source
RemoveDefaultFor(Style.EDefaultFor)
Declaration
public void RemoveDefaultFor(Style.EDefaultFor toRemove)
Parameters
|
Improve this Doc
View Source
SetDefaultFor(Style.EDefaultFor)
Declaration
public void SetDefaultFor(Style.EDefaultFor toSet)
Parameters
Explicit Interface Implementations
|
Improve this Doc
View Source
IColorDef.SetTopLevel(ColorDef)
Declaration
void IColorDef.SetTopLevel(ColorDef newValue)
Parameters
|
Improve this Doc
View Source
IColorDef.SetTopLevel(ColorDef, Boolean)
Declaration
void IColorDef.SetTopLevel(ColorDef newValue, bool overwriteChildNullColor)
Parameters
| Type |
Name |
Description |
| ColorDef |
newValue |
|
| System.Boolean |
overwriteChildNullColor |
|
|
Improve this Doc
View Source
IJsonSerialize.GetObjectData(IJsonWriteData)
Declaration
void IJsonSerialize.GetObjectData(IJsonWriteData data)
Parameters
|
Improve this Doc
View Source
IJsonSerialize.SetObjectData(IJsonReadData)
Declaration
void IJsonSerialize.SetObjectData(IJsonReadData data)
Parameters
|
Improve this Doc
View Source
INamedAttribute.GetSelectionProperty(String, Project, GeoObjectList)
Declaration
IShowProperty INamedAttribute.GetSelectionProperty(string key, Project project, GeoObjectList geoObjectList)
Parameters
Returns
|
Improve this Doc
View Source
INamedAttribute.Parent
Declaration
IAttributeList INamedAttribute.Parent { get; set; }
Returns
|
Improve this Doc
View Source
ICommandHandler.OnCommand(String)
Declaration
bool ICommandHandler.OnCommand(string MenuId)
Parameters
| Type |
Name |
Description |
| System.String |
MenuId |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ICommandHandler.OnSelected(MenuWithHandler, Boolean)
Declaration
void ICommandHandler.OnSelected(MenuWithHandler selectedMenuItem, bool selected)
Parameters
| Type |
Name |
Description |
| MenuWithHandler |
selectedMenuItem |
|
| System.Boolean |
selected |
|
|
Improve this Doc
View Source
ICommandHandler.OnUpdateCommand(String, CommandState)
Declaration
bool ICommandHandler.OnUpdateCommand(string MenuId, CommandState CommandState)
Parameters
| Type |
Name |
Description |
| System.String |
MenuId |
|
| CommandState |
CommandState |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
ICloneable.Clone()
Declaration
object ICloneable.Clone()
Returns
| Type |
Description |
| System.Object |
|
Implements
System.ICloneable
System.Runtime.Serialization.ISerializable