Parameter.ParameterName Property

[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.]

Gets or sets the name of the parameter.

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

Syntax

'Declaration
Public Property ParameterName As String
    Get
    Set
'Usage
Dim instance As Parameter
Dim value As String

value = instance.ParameterName

instance.ParameterName = value
public string ParameterName { get; set; }
public:
property String^ ParameterName {
    String^ get ();
    void set (String^ value);
}
member ParameterName : string with get, set
function get ParameterName () : String
function set ParameterName (value : String)

Property Value

Type: System.String
The name of the parameter.

Examples

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

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

See Also

Reference

Parameter Class

System.Windows.Controls Namespace