ValueTranslationService Class

Provides a mechanism for capturing property changes that are made by the user in the designer and providing new values at design time.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Services.ValueTranslationService

Namespace:  Microsoft.Windows.Design.Services
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public MustInherit Class ValueTranslationService
public abstract class ValueTranslationService
public ref class ValueTranslationService abstract
[<AbstractClass>]
type ValueTranslationService =  class end
public abstract class ValueTranslationService

The ValueTranslationService type exposes the following members.

Constructors

  Name Description
Protected method ValueTranslationService When overridden in a derived class, initializes a new instance of the ValueTranslationService class.

Top

Methods

  Name Description
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetProperties When overridden in a derived class, returns an enumeration that contains the properties to translate for the specified type.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method HasValueTranslation Determines whether the specified property should be translated for the specified type.
Public method InvalidateProperty Raises the PropertyInvalidated event to indicate that the specified property was invalidated.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TranslatePropertyValue Calls custom logic to translate the specified property for the specified type and instance, and specifies the value to translate.

Top

Events

  Name Description
Public event PropertyInvalidated Occurs when a property needs to be invalidated because of a change in a dependent property.

Top

Remarks

Normally, when a user changes a property value of an object in the designer, that value is set on the object in the designer. Custom control authors can insert custom logic into this process. The property value is translated from the value that the end user sets, to a new property value provided by the control author. For example, they want the user to be able to set the visible property of a control to false, but the control should still be visible at design time. The visible property is translated to true in the designer. These changes affect the designer only. At run time, the properties appear with the values set by the user.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Windows.Design.Services Namespace

DesignModeValueProvider

Other Resources

Walkthrough: Changing the Behavior of a Property at Design Time

WPF Designer Extensibility