MarginConverter
MarginConverter
- Namespace: ceTe.DynamicBarcode.Creator
- Assemblies: ceTe.DynamicBarcode.Creator.40.dll, ceTe.DynamicBarcode.Creator.Wpf.40.dll
Margin converter.
public class MarginConverter : TypeConverter
Public Class MarginConverter
Inherits TypeConverter
Inheritance: Object → TypeConverter → MarginConverter
Licensing
This class is a DynamicBarcode Creator feature. The following license is required for non-evaluation usage:
- DynamicBarcode Creator for .NET
Constructors
MarginConverter()
Initializes a new instance of the MarginConverter class.
public MarginConverter()
Public Sub New ()
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
public bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Function CanConvertFrom(context As ITypeDescriptorContext, sourceType As Type) As Boolean
Parameters
-
context: ITypeDescriptorContext
-
sourceType: Type
Returns
CanConvertFrom(Type)
Returns whether this converter can convert an object of the given type to the type of this converter. (Inherited from TypeConverter)
public bool CanConvertFrom(Type sourceType)
Function CanConvertFrom(sourceType As Type) As Boolean
Parameters
- sourceType: Type
A Type that represents the type you want to convert from.
Returns
if this converter can perform the conversion; otherwise, .
CanConvertTo(ITypeDescriptorContext, Type)
public bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Function CanConvertTo(context As ITypeDescriptorContext, destinationType As Type) As Boolean
Parameters
-
context: ITypeDescriptorContext
-
destinationType: Type
Returns
CanConvertTo(Type)
Returns whether this converter can convert the object to the specified type. (Inherited from TypeConverter)
public bool CanConvertTo(Type destinationType)
Function CanConvertTo(destinationType As Type) As Boolean
Parameters
- destinationType: Type
A Type that represents the type you want to convert to.
Returns
if this converter can perform the conversion; otherwise, .
ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)
public Object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
Function ConvertFrom(context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object
Parameters
-
context: ITypeDescriptorContext
-
culture: CultureInfo
-
value: Object
Returns
ConvertFrom(Object)
Converts the given value to the type of this converter. (Inherited from TypeConverter)
public Object ConvertFrom(Object value)
Function ConvertFrom(value As Object) As Object
Parameters
- value: Object
The Object to convert.
Returns
An Object that represents the converted value.
Exceptions
The conversion cannot be performed.
ConvertFromInvariantString(ITypeDescriptorContext, String)
Converts the given string to the type of this converter, using the invariant culture and the specified context. (Inherited from TypeConverter)
public Object ConvertFromInvariantString(ITypeDescriptorContext context, string text)
Function ConvertFromInvariantString(context As ITypeDescriptorContext, text As String) As Object
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- text: String
The String to convert.
Returns
An Object that represents the converted text.
Exceptions
The conversion cannot be performed.
ConvertFromInvariantString(String)
Converts the given string to the type of this converter, using the invariant culture. (Inherited from TypeConverter)
public Object ConvertFromInvariantString(string text)
Function ConvertFromInvariantString(text As String) As Object
Parameters
- text: String
The String to convert.
Returns
An Object that represents the converted text.
Exceptions
The conversion cannot be performed.
ConvertFromString(ITypeDescriptorContext, CultureInfo, String)
Converts the given text to an object, using the specified context and culture information. (Inherited from TypeConverter)
public Object ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, string text)
Function ConvertFromString(context As ITypeDescriptorContext, culture As CultureInfo, text As String) As Object
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- culture: CultureInfo
A CultureInfo . If is passed, the current culture is assumed.
- text: String
The String to convert.
Returns
An Object that represents the converted text.
Exceptions
The conversion cannot be performed.
ConvertFromString(ITypeDescriptorContext, String)
Converts the given text to an object, using the specified context. (Inherited from TypeConverter)
public Object ConvertFromString(ITypeDescriptorContext context, string text)
Function ConvertFromString(context As ITypeDescriptorContext, text As String) As Object
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- text: String
The String to convert.
Returns
An Object that represents the converted text.
Exceptions
The conversion cannot be performed.
ConvertFromString(String)
Converts the specified text to an object. (Inherited from TypeConverter)
public Object ConvertFromString(string text)
Function ConvertFromString(text As String) As Object
Parameters
- text: String
The text representation of the object to convert.
Returns
An Object that represents the converted text.
Exceptions
The string cannot be converted into the appropriate object.
ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)
public Object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
Function ConvertTo(context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object
Parameters
-
context: ITypeDescriptorContext
-
culture: CultureInfo
-
value: Object
-
destinationType: Type
Returns
ConvertTo(Object, Type)
Converts the given value object to the specified type, using the arguments. (Inherited from TypeConverter)
public Object ConvertTo(Object value, Type destinationType)
Function ConvertTo(value As Object, destinationType As Type) As Object
Parameters
- value: Object
The Object to convert.
- destinationType: Type
The Type to convert the parameter to.
Returns
An Object that represents the converted value.
Exceptions
The parameter is .
The conversion cannot be performed.
ConvertToInvariantString(ITypeDescriptorContext, Object)
Converts the specified value to a culture-invariant string representation, using the specified context. (Inherited from TypeConverter)
public string ConvertToInvariantString(ITypeDescriptorContext context, Object value)
Function ConvertToInvariantString(context As ITypeDescriptorContext, value As Object) As String
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- value: Object
The Object to convert.
Returns
A String that represents the converted value.
Exceptions
The conversion cannot be performed.
ConvertToInvariantString(Object)
Converts the specified value to a culture-invariant string representation. (Inherited from TypeConverter)
public string ConvertToInvariantString(Object value)
Function ConvertToInvariantString(value As Object) As String
Parameters
- value: Object
The Object to convert.
Returns
A String that represents the converted value.
Exceptions
The conversion cannot be performed.
ConvertToString(ITypeDescriptorContext, CultureInfo, Object)
Converts the given value to a string representation, using the specified context and culture information. (Inherited from TypeConverter)
public string ConvertToString(ITypeDescriptorContext context, CultureInfo culture, Object value)
Function ConvertToString(context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As String
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- culture: CultureInfo
A CultureInfo . If is passed, the current culture is assumed.
- value: Object
The Object to convert.
Returns
An Object that represents the converted value.
Exceptions
The conversion cannot be performed.
ConvertToString(ITypeDescriptorContext, Object)
Converts the given value to a string representation, using the given context. (Inherited from TypeConverter)
public string ConvertToString(ITypeDescriptorContext context, Object value)
Function ConvertToString(context As ITypeDescriptorContext, value As Object) As String
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- value: Object
The Object to convert.
Returns
An Object that represents the converted value.
Exceptions
The conversion cannot be performed.
ConvertToString(Object)
Converts the specified value to a string representation. (Inherited from TypeConverter)
public string ConvertToString(Object value)
Function ConvertToString(value As Object) As String
Parameters
- value: Object
The Object to convert.
Returns
An Object that represents the converted value.
Exceptions
The conversion cannot be performed.
CreateInstance(IDictionary)
Re-creates an Object given a set of property values for the object. (Inherited from TypeConverter)
public Object CreateInstance(IDictionary propertyValues)
Function CreateInstance(propertyValues As IDictionary) As Object
Parameters
- propertyValues: IDictionary
An IDictionary that represents a dictionary of new property values.
Returns
An Object representing the given IDictionary , or if the object cannot be created. This method always returns .
CreateInstance(ITypeDescriptorContext, IDictionary)
public Object CreateInstance(ITypeDescriptorContext context, IDictionary propertyValues)
Function CreateInstance(context As ITypeDescriptorContext, propertyValues As IDictionary) As Object
Parameters
-
context: ITypeDescriptorContext
-
propertyValues: IDictionary
Returns
Equals(Object)
Determines whether the specified Object is equal to the current Object . (Inherited from Object)
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
GetCreateInstanceSupported()
Returns whether changing a value on this object requires a call to the CreateInstance(System.Collections.IDictionary) method to create a new value. (Inherited from TypeConverter)
public bool GetCreateInstanceSupported()
Function GetCreateInstanceSupported() As Boolean
Returns
if changing a property on this object requires a call to CreateInstance(System.Collections.IDictionary) to create a new value; otherwise, .
GetCreateInstanceSupported(ITypeDescriptorContext)
public bool GetCreateInstanceSupported(ITypeDescriptorContext context)
Function GetCreateInstanceSupported(context As ITypeDescriptorContext) As Boolean
Parameters
- context: ITypeDescriptorContext
Returns
GetHashCode()
Serves as a hash function for a particular type. (Inherited from Object)
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for the current Object .
GetProperties(ITypeDescriptorContext, Object)
Returns a collection of properties for the type of array specified by the value parameter, using the specified context. (Inherited from TypeConverter)
public PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, Object value)
Function GetProperties(context As ITypeDescriptorContext, value As Object) As PropertyDescriptorCollection
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- value: Object
An Object that specifies the type of array for which to get properties.
Returns
A PropertyDescriptorCollection with the properties that are exposed for this data type, or if there are no properties.
GetProperties(ITypeDescriptorContext, Object, Attribute[])
public PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, Object value, Attribute[] attributes)
Function GetProperties(context As ITypeDescriptorContext, value As Object, attributes As Attribute[]) As PropertyDescriptorCollection
Parameters
-
context: ITypeDescriptorContext
-
value: Object
-
attributes: Attribute[]
Returns
GetProperties(Object)
Returns a collection of properties for the type of array specified by the value parameter. (Inherited from TypeConverter)
public PropertyDescriptorCollection GetProperties(Object value)
Function GetProperties(value As Object) As PropertyDescriptorCollection
Parameters
- value: Object
An Object that specifies the type of array for which to get properties.
Returns
A PropertyDescriptorCollection with the properties that are exposed for this data type, or if there are no properties.
GetPropertiesSupported()
Returns whether this object supports properties. (Inherited from TypeConverter)
public bool GetPropertiesSupported()
Function GetPropertiesSupported() As Boolean
Returns
if GetProperties(System.Object) should be called to find the properties of this object; otherwise, .
GetPropertiesSupported(ITypeDescriptorContext)
public bool GetPropertiesSupported(ITypeDescriptorContext context)
Function GetPropertiesSupported(context As ITypeDescriptorContext) As Boolean
Parameters
- context: ITypeDescriptorContext
Returns
GetStandardValues()
Returns a collection of standard values from the default context for the data type this type converter is designed for. (Inherited from TypeConverter)
public ICollection GetStandardValues()
Function GetStandardValues() As ICollection
Returns
A StandardValuesCollection containing a standard set of valid values, or if the data type does not support a standard set of values.
GetStandardValues(ITypeDescriptorContext)
Returns a collection of standard values for the data type this type converter is designed for when provided with a format context. (Inherited from TypeConverter)
public StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
Function GetStandardValues(context As ITypeDescriptorContext) As StandardValuesCollection
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context that can be used to extract additional information about the environment from which this converter is invoked. This parameter or properties of this parameter can be .
Returns
A StandardValuesCollection that holds a standard set of valid values, or if the data type does not support a standard set of values.
GetStandardValuesExclusive()
Returns whether the collection of standard values returned from GetStandardValues is an exclusive list. (Inherited from TypeConverter)
public bool GetStandardValuesExclusive()
Function GetStandardValuesExclusive() As Boolean
Returns
if the StandardValuesCollection returned from GetStandardValues is an exhaustive list of possible values; if other values are possible.
GetStandardValuesExclusive(ITypeDescriptorContext)
Returns whether the collection of standard values returned from GetStandardValues is an exclusive list of possible values, using the specified context. (Inherited from TypeConverter)
public bool GetStandardValuesExclusive(ITypeDescriptorContext context)
Function GetStandardValuesExclusive(context As ITypeDescriptorContext) As Boolean
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
Returns
if the StandardValuesCollection returned from GetStandardValues is an exhaustive list of possible values; if other values are possible.
GetStandardValuesSupported()
Returns whether this object supports a standard set of values that can be picked from a list. (Inherited from TypeConverter)
public bool GetStandardValuesSupported()
Function GetStandardValuesSupported() As Boolean
Returns
if GetStandardValues should be called to find a common set of values the object supports; otherwise, .
GetStandardValuesSupported(ITypeDescriptorContext)
Returns whether this object supports a standard set of values that can be picked from a list, using the specified context. (Inherited from TypeConverter)
public bool GetStandardValuesSupported(ITypeDescriptorContext context)
Function GetStandardValuesSupported(context As ITypeDescriptorContext) As Boolean
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
Returns
if GetStandardValues should be called to find a common set of values the object supports; otherwise, .
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
IsValid(ITypeDescriptorContext, Object)
Returns whether the given value object is valid for this type and for the specified context. (Inherited from TypeConverter)
public bool IsValid(ITypeDescriptorContext context, Object value)
Function IsValid(context As ITypeDescriptorContext, value As Object) As Boolean
Parameters
- context: ITypeDescriptorContext
An ITypeDescriptorContext that provides a format context.
- value: Object
The Object to test for validity.
Returns
if the specified value is valid for this object; otherwise, .
IsValid(Object)
Returns whether the given value object is valid for this type. (Inherited from TypeConverter)
public bool IsValid(Object value)
Function IsValid(value As Object) As Boolean
Parameters
- value: Object
The object to test for validity.
Returns
if the specified value is valid for this object; otherwise, .
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .