1

I am trying to use the extended toolkit Zoombox in my WPF Application with NET451. I am using a tabcontrol for navigation and the items are bound to an observablecollection of ContentControls. When i change tab the content is changed but the zoomparameters are not reset. Also i want to disable zooming for certain tabitems. Binding to properties such as scale, minscale and maxscale does not seem to do the trick. My question is, how can i reset/go to home when changing view? And how can i disable zoom for cetain tabitems?

XAML Looks like:

<Controls:MetroWindow x:Class="Metrotest.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
            xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
            xmlns:local="clr-namespace:Metrotest"
            mc:Ignorable="d"
            Title="MainWindow" Height="350" Width="525">
        <Controls:MetroWindow.Resources>
            <BooleanToVisibilityConverter x:Key="BoolToVis" />
        </Controls:MetroWindow.Resources>
        <Grid>
            <Grid.DataContext>
                <local:MainViewModel/>
            </Grid.DataContext>
            <TabControl ItemsSource="{Binding tabitems}">
                <TabControl.ContentTemplate>
                    <ItemContainerTemplate>

                            <Controls:FlipView 
                                       IsBannerEnabled="False" 
                                       ItemsSource="{Binding flipviewitems}"   >
                                    <Controls:FlipView.ItemTemplate>
                                        <DataTemplate>
                                    <toolkit:Zoombox ZoomOn="Content"  x:Name="zoombox" AutoWrapContentWithViewbox="False"   >
                                        <ContentControl Content="{Binding flipview.Content}"/>
                                    </toolkit:Zoombox>
                                </DataTemplate>
                                </Controls:FlipView.ItemTemplate>
                        </Controls:FlipView>

                    </ItemContainerTemplate>
                </TabControl.ContentTemplate>
            </TabControl>
        </Grid>
    </Controls:MetroWindow>
jsandv
  • 276
  • 4
  • 20

0 Answers0