I am quite new to XMAL but have managed to cobble together a form that retrieves data from SQL and populates a data grid. To extend this I want to only return data based on two dates. I have created a method GetAllActionLogsBetweenDates() this takes two properties QueryFromDate, QueryToDate.
I need to pass the 2 dates from the date pickers to the GetAllActionLogsBetweenDates method when the FindButton is clicked.
My XAML looks like this
<StackPanel Height="114"
Orientation="Vertical"
HorizontalAlignment="Left"
Name="StackPanel1"
VerticalAlignment="Top"
Width="507">
<DatePicker Height="25"
SelectedDate="{Binding QueryFromDate, Mode=TwoWay}"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Width="115"
x:Name="DateFrom"
Margin="5"/>
<DatePicker Height="25"
SelectedDate="{Binding QueryToDate, Mode=TwoWay}"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Width="115"
Margin ="5 "
x:Name="DateTo"/>
<Button Content="Find"
x:Name="FindButton"
Command="{Binding ?????}"
Height="23"
Margin="5"
Width="75"
HorizontalAlignment="Left" />
</StackPanel>
I think I have to do something in the Command="{Binding ?????}" element referencing my method and presumably the 2 properties QueryFromDate, QueryToDate but I am not sure what
Thanks