You can add a property that holds the ZoomBoxPanel
to your UserControl
:
public class MyUserControl : UserControl
{
...
public ZoomBoxPanel MyZoomBox
{
get { return zoomBox; }
}
...
}
and, use this property for the binding:
<local:MyUserControl x:Name="myUc" ... />
<zb:ZoomBoxSlider Margin="10" Grid.Row="2" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Top"
ZoomBox="{Binding ElementName=myUc, Path=MyZoomBox}" />