Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Zoombox controlled externaly

$
0
0
Hi,

Simply set a CommandTarget to be the ZoomBox :
<Grid>
      <xctk:Zoombox x:Name="_zoomBox">
         <Image Source="Default.jpg" />
      </xctk:Zoombox>
      <StackPanel>
         <Button x:Name="HomeButton"
                 Width="20px"
                 Height="20px"
                 Command="xctk:Zoombox.Home"
                 CommandTarget="{Binding ElementName=_zoomBox}"
                 ToolTip="Go Home"
                 Content="GO HOME">
         </Button>
         <Button x:Name="FitButton"
                 Width="20px"
                 Height="20px"
                 Margin="2,0"
                 Command="xctk:Zoombox.Fit"
                 CommandTarget="{Binding ElementName=_zoomBox}"
                 ToolTip="Fit Content within Bounds"
                 Content="FIT">
         </Button>
      </StackPanel>
   </Grid>

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>