1
我使用MahApps AnimatedTabControl,我需要創建一個的ControlTemplate添加一個ScrollViewer中的標題標籤。這是我的模板:添加控件模板來AnimatedTabControl而不覆蓋動畫行爲
<TabControl.Template>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<ScrollViewer x:Name="_MainTabControlScrollViewer" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled">
<TabPanel x:Name="HeaderPanel" IsItemsHost="True" Margin="0,4,0,0"/>
</ScrollViewer>
<ContentPresenter x:Name="PART_SelectedContentHost" Margin="4" ContentSource="SelectedContent" Grid.Row="1"/>
</Grid>
</ControlTemplate>
</TabControl.Template>
但是,這會殺死動畫。有沒有辦法繼承默認的AnimatedTabControl行爲?
不幸的是,沒有幫助。我懷疑這是因爲有另一個ControlTemplate將我的Grid包裝在
eYe