ControlParameter was a misfit, why? Look at the following (old) code:
<riaData:ControlParameter ParameterName="title" ControlName="filterTextBox" PropertyName="Text" />
Now there's no databinding, and that most certainly isn't the (new) .NET way. Check out below how it should look now, with Silverlight 4. Here we doe some data filtering with DomainDataSource.FilterDescriptor.
<riaControls:DomainDataSource Name="ExampleSource" QueryName="GetExampleQuery" AutoLoad="True"> <riaControls:DomainDataSource.FilterDescriptors> <riaControls:FilterDescriptor PropertyPath="title" Operator="Contains" Value="{Binding Text, ElementName=filterTextBox}"> </riaControls:FilterDescriptor> </riaControls:DomainDataSource.FilterDescriptors> <riaControls:DomainDataSource.DomainContext> <domain:ExampleDataContext /> </riaControls:DomainDataSource.DomainContext> </riaControls:DomainDataSource>
See, everything is well now. :-)
Keine Kommentare:
Kommentar veröffentlichen