Class DynamicObjectExtension
Can be used to create dynamic objects via markup. This can be used to create data-bound objects purely from Markup. E.g. for the Sartorius.SAF.Presentation.Behaviors.ComboBoxItemDisplayBehavior.EmptyItem.
Inheritance
System.Object
    System.Windows.Markup.MarkupExtension
    DynamicObjectExtension
  
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
    Namespace: Sartorius.SAF.Presentation.Extensions
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class DynamicObjectExtension : MarkupExtension
  Examples
The following XAML-markup creates an dynamic object with the signature below.
<SAF:DynamicObject x:Key="DynamicEmptyItem">
    <SAF:DynamicObject.Members>
        <system:String x:Key="Name">Empty Dynamic Item</system:String>
        <system:Int32 x:Key="Value">-1</system:Int32>
    </SAF:DynamicObject.Members>
</SAF:DynamicObject>
</code>
<code language="C#">
public class DynamicObject
{
    public string Name { get; set; }
    public int Value { get; set; }
}
  Constructors
View SourceDynamicObjectExtension()
Creates a new Instance of DynamicObjectExtension
Declaration
public DynamicObjectExtension()
  Properties
View SourceMemberName
Declaration
public string MemberName { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | 
Members
Declaration
public Dictionary<string, object> Members { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.Dictionary<System.String, System.Object> | 
MemberValue
Declaration
public object MemberValue { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Object | 
Methods
View SourceProvideValue(IServiceProvider)
When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.
Declaration
public override object ProvideValue(IServiceProvider serviceProvider)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.IServiceProvider | serviceProvider | A service provider helper that can provide services for the markup extension.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Object | The object value to set on the property where the extension is applied.  | 
      
Overrides
System.Windows.Markup.MarkupExtension.ProvideValue(System.IServiceProvider)