MouseWheelGestureValueSerializer Class
Converts instances of System.String to and from instances of MouseWheelGesture.
public class MouseWheelGestureValueSerializer : ValueSerializer
- Inheritance:
- System.Object System.Windows.Markup.ValueSerializer Object
Constructors
MouseWheelGestureValueSerializer()
public MouseWheelGestureValueSerializer()
Methods
CanConvertFromString(String, IValueSerializerContext)
Determines whether the specified System.String can be converted to an instance of the type that the implementation of System.Windows.Markup.ValueSerializer supports.
public override bool CanConvertFromString(string value, IValueSerializerContext context)
Parameter | Type | Description |
---|---|---|
value | System.String | String to evaluate for conversion. |
context | System.Windows.Markup.IValueSerializerContext | Context information that is used for conversion. |
Returns
- System.Boolean:
true
if the value can be converted; otherwise,false
.
CanConvertToString(Object, IValueSerializerContext)
Determines whether the specified object can be converted into a System.String.
public override bool CanConvertToString(object value, IValueSerializerContext context)
Parameter | Type | Description |
---|---|---|
value | System.Object | The object to evaluate for conversion. |
context | System.Windows.Markup.IValueSerializerContext | Context information that is used for conversion. |
Returns
- System.Boolean:
true if the
value
can be converted into a System.String; otherwise, false.
ConvertFromString(String, IValueSerializerContext)
Converts a System.String to an instance of the type that the implementation of System.Windows.Markup.ValueSerializer supports.
public override object ConvertFromString(string value, IValueSerializerContext context)
Parameter | Type | Description |
---|---|---|
value | System.String | The string to convert. |
context | System.Windows.Markup.IValueSerializerContext | Context information that is used for conversion. |
Returns
- System.Object:
A new instance of the type that the implementation of System.Windows.Markup.ValueSerializer supports based on the supplied
value
.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException |
|
ConvertToString(Object, IValueSerializerContext)
Converts the specified object to a System.String.
public override string ConvertToString(object value, IValueSerializerContext context)
Parameter | Type | Description |
---|---|---|
value | System.Object | The object to convert into a string. |
context | System.Windows.Markup.IValueSerializerContext | Context information that is used for conversion. |
Returns
- System.String:
A string representation of the specified object.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException |
|
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()