Parameter Class

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Defines parameters for domain service queries used by DomainDataSource.


Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.DomainServices (in System.Windows.Controls.DomainServices.dll)

Public Class Parameter _
	Inherits DependencyObject
Dim instance As Parameter

The Parameter type exposes the following members.

Public methodParameterInitializes a new instance of the Parameter class.

Public propertyDispatcher (Inherited from DependencyObject.)
Public propertyParameterNameGets or sets the name of the parameter.
Public propertyValueGets or sets the value of the parameter.

Public methodCheckAccess (Inherited from DependencyObject.)
Public methodClearValue (Inherited from DependencyObject.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetAnimationBaseValue (Inherited from DependencyObject.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodGetValue (Inherited from DependencyObject.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodReadLocalValue (Inherited from DependencyObject.)
Public methodSetValue (Inherited from DependencyObject.)
Public methodToString (Inherited from Object.)

Public fieldStatic memberParameterNamePropertyIdentifies the ParameterName dependency property.
Public fieldStatic memberValuePropertyIdentifies the Value dependency property.

In some cases, a query method requires parameter values. Typically, a query method requires a parameter value to filter the data that is returned. The DomainDataSource class provides the QueryParameters collection to facilitate adding parameters. To add a parameter that uses a value from the user for the query, you bind a Parameter object to the user-input control that contains the value to use in the query and include that parameter in the QueryParameters collection.

The following example shows how to specify a value from a combo box as the parameter value.

<Grid x:Name="LayoutRoot" Background="White">
        <RowDefinition Height="25" />
        <RowDefinition Height="Auto" />
    <riaControls:DomainDataSource x:Name="source" QueryName="GetProductsByColor" AutoLoad="true">
            <domain:ProductDomainContext />
                RefreshEventName="SelectionChanged" />
    <ComboBox Width="60"  Grid.Row="0" x:Name="colorCombo">
        <ComboBoxItem Content="Black" />
        <ComboBoxItem Content="Blue" />
    <data:DataGrid Grid.Row="1" ItemsSource="{Binding Data, ElementName=source}" />

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