DesignModeValueProvider.TranslatePropertyValue Method
Captures property changes that were made by the user in the designer and uses custom logic to provide new values at design time.
Namespace: Microsoft.Windows.Design.Model
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Overridable Function TranslatePropertyValue ( _
item As ModelItem, _
identifier As PropertyIdentifier, _
value As Object _
) As Object
public virtual Object TranslatePropertyValue(
ModelItem item,
PropertyIdentifier identifier,
Object value
)
public:
virtual Object^ TranslatePropertyValue(
ModelItem^ item,
PropertyIdentifier identifier,
Object^ value
)
abstract TranslatePropertyValue :
item:ModelItem *
identifier:PropertyIdentifier *
value:Object -> Object
override TranslatePropertyValue :
item:ModelItem *
identifier:PropertyIdentifier *
value:Object -> Object
public function TranslatePropertyValue(
item : ModelItem,
identifier : PropertyIdentifier,
value : Object
) : Object
Parameters
- item
Type: Microsoft.Windows.Design.Model.ModelItem
The ModelItem to capture property changes for.
- identifier
Type: Microsoft.Windows.Design.Metadata.PropertyIdentifier
The property that the user is changing the value of.
- value
Type: System.Object
The new value that the user is changing the property to.
Return Value
Type: System.Object
The value to set the property to in the designer.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | item is nulla null reference (Nothing in Visual Basic). |
ArgumentNullException | identifier is empty. |
Remarks
The TranslatePropertyValue method is called one time for each property in Properties. The return value can be a new value, or the same value that was passed to the method.
These changes affect the designer only. At run time, the properties appear with the values set by the user.
Important
When you use this technique, the behavior of a property in the designer does not match the value of the property in XAML view. XAML view displays the value that the user entered at design time. The value in XAML view represents the behavior that the property will exhibit at run time.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.