I am trying to bind a command to the checked event of the CheckEdit Control. What I need to do is when All is checked values of the individual months in model to checked. Here is the XAML
XAML<dxlc:LayoutGroup Orientation="Vertical"
Header="Reporting Months"
View="GroupBox"
Background="White" >
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem IsRequired="True" Label="All" LabelPosition="Left" >
<dxe:CheckEdit IsChecked="{Binding Parameter.RptAll}" />
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem IsRequired="True" Label="January" LabelPosition="Left" >
<dxe:CheckEdit IsChecked="{Binding Parameter.RptJan}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem IsRequired="True" Label="February" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptFeb}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem IsRequired="True" Label="March" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptMar}"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem IsRequired="True" Label="April" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptApr}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem IsRequired="True" Label="May" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptMay}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem IsRequired="True" Label="June" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptJun}"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem IsRequired="True" Label="July" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptJul}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem IsRequired="True" Label="August" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptAug}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem IsRequired="True" Label="September" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptSep}"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem IsRequired="True" Label="October" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptOct}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem IsRequired="True" Label="November" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptNov}"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem IsRequired="True" Label="December" LabelPosition="Left">
<dxe:CheckEdit IsChecked="{Binding Parameter.RptDec}"/>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutGroup>
I tried binding it to a command using
XAMLChecked="{Binding AllMonthsCheckedCommand}"
But when the window loads I get the following error.
{"'Provide value on 'System.Windows.Data.Binding' threw an exception.' Line number '137' and line position '44'."}
The line and position reference the Checked event in the XAML.
Basically what I am trying to do here and in other places is if a checkbox is checked or unchecked make changes to the model that are then reflected in what the user sees. For example another thing I am trying to do is if a user checks a box change the background color of a panel.
Any suggestions or pointers to examples / tutorials would be appreciated.
Thanks.
Tom