扩展的WPF工具包zoombox禁用缩放和重置

时间:2016-05-30 12:55:11

标签: wpf xaml zoom wpf-extended-toolkit

我正在尝试使用NET451的WPF应用程序中的扩展工具包Zoombox。 我使用tabcontrol进行导航,项目绑定到一个可观察的ContentControls集合。当我更改标签时,内容会更改,但不会重置缩放比例。此外,我想禁用某些tabitems缩放。绑定到诸如scale,minscale和maxscale之类的属性似乎不起作用。我的问题是,在更改视图时如何重置/回家? 如何禁用缩放cetain tabitems?

XAML看起来像:

<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>

0 个答案:

没有答案