Class PropertyContainer
A style is an object that encapsulates one or more properties in a property container.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public abstract class PropertyContainer : IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable
Remarks
Style objects provide a wrapper for a collection of properties in a property container. Getting and setting properties through a style object is easier than doing it through the IPropertyContainer interface because the style object provides type-safe wrappers for each property. The properties exposed through a style object are also browsable in the property grid.
Constructors
PropertyContainer()
Initializes a new instance of the PropertyContainer class.
Declaration
public PropertyContainer()
PropertyContainer(PropertyContainer)
Initializes a new instance of the PropertyContainer class.
Declaration
public PropertyContainer(PropertyContainer src)
Parameters
Type | Name | Description |
---|---|---|
PropertyContainer | src | The SRC. |
PropertyContainer(SerializationInfo, StreamingContext)
Initializes a new instance of the PropertyContainer class.
Declaration
protected PropertyContainer(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Fields
m_propertyObserver
Declaration
protected IPropertyObserver m_propertyObserver
Field Value
Type |
---|
IPropertyObserver |
Properties
FullContainerName
Gets the full name of the container.
Declaration
public string FullContainerName { get; }
Property Value
Type | Description |
---|---|
System.String | The full name of the container. |
HistoryService
Gets the history manager service.
Declaration
protected HistoryManager HistoryService { get; }
Property Value
Type | Description |
---|---|
HistoryManager | The history manager service. |
InheritContainerMeasureUnits
Gets or sets a value indicating whether current instance inherit container measure units.
Declaration
public virtual bool InheritContainerMeasureUnits { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MeasureUnit
Gets or sets the measure unit.
Declaration
public virtual MeasureUnits MeasureUnit { get; set; }
Property Value
Type | Description |
---|---|
MeasureUnits | The measure unit. |
PropertyObserber
Gets the property observer.
Declaration
protected IPropertyObserver PropertyObserber { get; }
Property Value
Type | Description |
---|---|
IPropertyObserver | The property observer. |
Methods
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public abstract object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Dispose()
Declaration
public virtual void Dispose()
GetObjectData(SerializationInfo, StreamingContext)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
Declaration
protected virtual 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 (see System.Runtime.Serialization.StreamingContext) for this serialization. |
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The caller does not have the required permission. |
GetPropertyContainerByName(String)
Gets the container of the property by name.
Declaration
public virtual object GetPropertyContainerByName(string strPropertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPropertyName | Name of the property. |
Returns
Type | Description |
---|---|
System.Object | The property container. |
GetPropertyContainerName()
Gets the name of the property container.
Declaration
protected abstract string GetPropertyContainerName()
Returns
Type | Description |
---|---|
System.String | The property container name. |
OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)
Called when measure units changing.
Declaration
protected virtual void OnMeasureUnitsChanging(MeasureUnits from, MeasureUnits to)
Parameters
Type | Name | Description |
---|---|---|
MeasureUnits | from | The old value. |
MeasureUnits | to | The new value. |
OnPropertyChanged(String)
Called when property changed.
Declaration
protected virtual void OnPropertyChanged(string strPropertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPropertyName | Name of the property. |
OnPropertyChanging(String, Object)
Called when property changing.
Declaration
protected virtual bool OnPropertyChanging(string strPropertyName, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPropertyName | Name of the property. |
System.Object | newValue | The new value. |
Returns
Type | Description |
---|---|
System.Boolean | true, if property is changing. |
ProvideServiceReference(RuntimeTypeHandle)
Get the service reference from provider.
Declaration
public virtual object ProvideServiceReference(RuntimeTypeHandle typeHandle)
Parameters
Type | Name | Description |
---|---|---|
System.RuntimeTypeHandle | typeHandle | The type handle. |
Returns
Type | Description |
---|---|
System.Object | The object. |
RecordPropertyChanged(String)
Records the property changed.
Declaration
protected virtual void RecordPropertyChanged(string strPropertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPropertyName | Name of the property. |
UpdateServiceReferences(IServiceReferenceProvider)
Updates the service references.
Declaration
public virtual void UpdateServiceReferences(IServiceReferenceProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IServiceReferenceProvider | provider | The provider. |
Explicit Interface Implementations
IPropertyObserver.OnPropertyChanged(String, String)
Declaration
void IPropertyObserver.OnPropertyChanged(string strPropertyContainerName, string strPropertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPropertyContainerName | |
System.String | strPropertyName |
IPropertyObserver.OnPropertyChanging(String, String, Object)
Declaration
bool IPropertyObserver.OnPropertyChanging(string strPropertyContainerName, string strPropertyName, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPropertyContainerName | |
System.String | strPropertyName | |
System.Object | newValue |
Returns
Type |
---|
System.Boolean |
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
Declaration
void ISerializable.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 (see System.Runtime.Serialization.StreamingContext) for this serialization. |
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The caller does not have the required permission. |