Follow these steps to create a UI with two checkboxes and a button, and then apply a multi data trigger to enable/disable the button, based on the check state:
- Let's begin by replacing the Grid with a StackPanel, having two checkbox (chkLicense and chkTerms) controls and one button:
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <CheckBox x:Name="chkLicense" Content="Yes, I accept license agreement" /> <CheckBox x:Name="chkTerms" Content="Yes, I accept Terms & Conditions" /> <Button HorizontalAlignment="Center" Margin="0,20,0,0" FontSize="20" Content="Register"> </Button> </StackPanel>
- Now, modify the Button to expose its style, as follows:
<Button HorizontalAlignment="Center"...