DomainDataSource.QueryParameters Property
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.]
Gets the collection of Parameter objects representing arguments of the EntityQuery(Of TEntity) method specified by the QueryName property.
Namespace: System.Windows.Controls
Assembly: System.Windows.Controls.DomainServices (in System.Windows.Controls.DomainServices.dll)
'Declaration Public Property QueryParameters As ParameterCollection Get Private Set 'Usage Dim instance As DomainDataSource Dim value As ParameterCollection value = instance.QueryParameters
Property Value
Type: System.Windows.Controls.ParameterCollectionThe collection of parameters passed to the query specified by the QueryName property.
The following example shows how to use 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>
Show: