I have a custom control that contains two elements that can be clicked (a button and a check box). I'd like to be able to put events in the XAML for each of these events.
i.e.
<Control OnButtonClick="SomeEvent" OnCheckBoxClick="SomeOtherEvent" />
I have no idea how to bind events like that. Any pointers?
The following is the content of the user control:
<Style TargetType="{x:Type local:DeleteCheckBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:DeleteCheckBox}">
<Grid>
<Label Height="25" BorderBrush="LightGray" BorderThickness="1" Padding="0" DockPanel.Dock="Top" FlowDirection="RightToLeft" Visibility="Hidden">
<Button x:Name="ImageButton1" Background="Transparent" Padding="0" BorderBrush="Transparent" Height="11" Width="11" Click="--Bind Function Here--" />
</Label>
<CheckBox Content="A0000" Click="--Bind Function Here--" IsChecked="True" Margin="0,10,10,0" VerticalContentAlignment="Center"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>