I have written a simple Window
which contains a custom UserControl
named A and two RadioButton
s, named B1,B2. The custom UserControl
A contains an InkCanvas
named C and some other controls. Now I would like to MultiBinding
the InkCanvas.EditingMode
Property to the status of the two RadioButton
s, saying when both the two buttons checked, the InkCanvas.EditingMode
set to InkCanvasEditingMode.Ink
, otherwise InkCanvasEditingMode.None
.
I know that, in normal case, the following code can make it work:
<InkCanvas.EditingMode>
<MultiBinding Converter="{StaticResource editmodeconv}">
<Binding ElementName="B1" Path="IsChecked" Mode="TwoWay"/>
<Binding ElementName="B2" Path="IsChecked" Mode="TwoWay"/>
</MultiBinding>
</InkCanvas.EditingMode>
However, since the InkCanvas
C has been contained by the custom UserControl
A, it has no longer been exposed the two buttons B1 and B2. So, how to implement it?