Skip to content

Commit b38ac94

Browse files
committed
Changes to TabView Animation Behavior
1 parent 7717c95 commit b38ac94

File tree

3 files changed

+29
-16
lines changed

3 files changed

+29
-16
lines changed

Files UWP/App.xaml.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,6 @@ await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPrio
198198
}
199199

200200
});
201-
202-
203-
204201
}
205202

206203
private async void Watcher_EnumerationCompleted(DeviceWatcher sender, object args)

Files UWP/InstanceTabsView.xaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,13 @@
9595
<ColumnDefinition x:Name="RightContentColumn" Width="*"/>
9696
</Grid.ColumnDefinitions>
9797
<ContentPresenter x:Name="LeftContentPresenter" ContentTemplate="{TemplateBinding TabStripHeaderTemplate}" Content="{TemplateBinding TabStripHeader}" Grid.Column="0"/>
98-
<primitiveContract7Present:TabViewListView x:Name="TabListView" AllowDrop="{TemplateBinding AllowDropTabs}" CanReorderItems="{TemplateBinding CanReorderTabs}" Grid.Column="1" CanDragItems="{TemplateBinding CanDragTabs}" ItemTemplate="{TemplateBinding TabItemTemplate}" ItemsSource="{TemplateBinding TabItemsSource}" ItemTemplateSelector="{TemplateBinding TabItemTemplateSelector}"/>
98+
<primitiveContract7Present:TabViewListView x:Name="TabListView" AllowDrop="{TemplateBinding AllowDropTabs}" CanReorderItems="{TemplateBinding CanReorderTabs}" Grid.Column="1" CanDragItems="{TemplateBinding CanDragTabs}" ItemTemplate="{TemplateBinding TabItemTemplate}" ItemsSource="{TemplateBinding TabItemsSource}" ItemTemplateSelector="{TemplateBinding TabItemTemplateSelector}">
99+
<primitiveContract7Present:TabViewListView.ItemContainerTransitions>
100+
<TransitionCollection>
101+
<ReorderThemeTransition />
102+
</TransitionCollection>
103+
</primitiveContract7Present:TabViewListView.ItemContainerTransitions>
104+
</primitiveContract7Present:TabViewListView>
99105
<Button x:Name="AddButton" Command="{TemplateBinding AddTabButtonCommand}" CommandParameter="{TemplateBinding AddTabButtonCommandParameter}" Content="&#xE710;" Grid.Column="2" Style="{StaticResource TabViewButtonStyle}" Visibility="{Binding IsAddTabButtonVisible, RelativeSource={RelativeSource Mode=TemplatedParent}}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
100106
<Button.KeyboardAccelerators>
101107
<KeyboardAccelerator Modifiers="Control" Key="T"/>

Files UWP/ProHome.xaml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:local="using:Files"
5-
xmlns:local1="using:Files.Interacts.Home"
6-
xmlns:local2="using:Files.Interacts"
7-
xmlns:local3="using:Files.Filesystem"
85
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
96
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
107
xmlns:Custom="using:Microsoft.Toolkit.Uwp.UI.Controls"
@@ -13,14 +10,8 @@
1310
mc:Ignorable="d"
1411
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
1512
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
16-
xmlns:ex="using:Microsoft.Toolkit.Uwp.UI.Extensions"
1713
xmlns:Windows10version1809="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 7)"
18-
xmlns:Windows10version1903="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 8)"
19-
Loaded="Page_Loaded"
20-
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives"
21-
xmlns:primitiveContract7Present="using:Microsoft.UI.Xaml.Controls.Primitives?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
22-
xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
23-
xmlns:animations1="using:Microsoft.Toolkit.Uwp.UI.Animations.Behaviors">
14+
Loaded="Page_Loaded">
2415
<Page.Resources>
2516
<Style x:Key="ListViewHeaderItemStyle1" TargetType="ListViewHeaderItem">
2617
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
@@ -631,7 +622,14 @@
631622
<Grid Margin="0,0,0,0" Canvas.ZIndex="2" x:Name="Ribbon" Grid.Row="0">
632623
<StackPanel Name="RibbonPanel" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Orientation="Vertical">
633624
<Custom:TabView ItemsPanel="{StaticResource TabViewItemsPanel1}" TabWidthBehavior="Actual" Background="Transparent" Template="{StaticResource TabViewTemplate1}">
625+
<Custom:TabView.ItemContainerTransitions>
626+
<TransitionCollection>
627+
</TransitionCollection>
628+
</Custom:TabView.ItemContainerTransitions>
634629
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" BorderThickness="0" Header="File" MinWidth="48" MinHeight="32" Width="Auto">
630+
<Custom:TabViewItem.Resources>
631+
<ResourceDictionary Source="ms-appx:///Microsoft.UI.Xaml/DensityStyles/Compact.xaml" />
632+
</Custom:TabViewItem.Resources>
635633
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
636634
<CommandBar.Content>
637635
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
@@ -641,7 +639,10 @@
641639
</CommandBar.Content>
642640
</CommandBar>
643641
</Custom:TabViewItem>
644-
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" IsSelected="True" BorderThickness="0" Header="Home" MinWidth="48" MinHeight="32" Width="Auto">
642+
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" IsSelected="True" BorderThickness="0" Header="Home" MinWidth="48" MinHeight="32" Width="Auto">
643+
<Custom:TabViewItem.Resources>
644+
<ResourceDictionary Source="ms-appx:///Microsoft.UI.Xaml/DensityStyles/Compact.xaml" />
645+
</Custom:TabViewItem.Resources>
645646
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
646647
<CommandBar.Content>
647648
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
@@ -673,6 +674,9 @@
673674
</CommandBar>
674675
</Custom:TabViewItem>
675676
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" BorderThickness="0" Header="Share" MinWidth="48" MinHeight="32" Width="Auto">
677+
<Custom:TabViewItem.Resources>
678+
<ResourceDictionary Source="ms-appx:///Microsoft.UI.Xaml/DensityStyles/Compact.xaml" />
679+
</Custom:TabViewItem.Resources>
676680
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
677681
<CommandBar.Content>
678682
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
@@ -682,6 +686,9 @@
682686
</CommandBar>
683687
</Custom:TabViewItem>
684688
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" BorderThickness="0" Header="Layout" MinWidth="48" MinHeight="32" Width="Auto">
689+
<Custom:TabViewItem.Resources>
690+
<ResourceDictionary Source="ms-appx:///Microsoft.UI.Xaml/DensityStyles/Compact.xaml" />
691+
</Custom:TabViewItem.Resources>
685692
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
686693
<CommandBar.Content>
687694
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
@@ -715,6 +722,9 @@
715722
</CommandBar>
716723
</Custom:TabViewItem>
717724
<Custom:TabViewItem Visibility="Collapsed" Name="SearchTools" Template="{StaticResource TabViewItemFluentTemplate}" BorderThickness="0" Header="Search" MinWidth="48" MinHeight="32" Width="Auto">
725+
<Custom:TabViewItem.Resources>
726+
<ResourceDictionary Source="ms-appx:///Microsoft.UI.Xaml/DensityStyles/Compact.xaml" />
727+
</Custom:TabViewItem.Resources>
718728
<Custom:TabViewItem.Background>
719729
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
720730
<GradientStop Color="#FFD9D7D2" Offset="0"/>
@@ -919,7 +929,7 @@
919929
</ListView.ItemTemplate>
920930
</ListView>
921931
<TextBlock Margin="10,10,10,5" Text="Drives" FontSize="14" FontWeight="Bold" Padding="0" VerticalAlignment="Stretch"/>
922-
<ListView AllowDrop="True" CanReorderItems="True" ItemsSource="{x:Bind local:App.foundDrives}" SelectionChanged="DrivesList_SelectionChanged" SelectionMode="Single" IsItemClickEnabled="True" ItemClick="DrivesList_ItemClick" Name="DrivesList">
932+
<ListView ItemsSource="{x:Bind local:App.foundDrives}" SelectionChanged="DrivesList_SelectionChanged" SelectionMode="Single" IsItemClickEnabled="True" ItemClick="DrivesList_ItemClick" Name="DrivesList">
923933
<ListView.Resources>
924934
<ResourceDictionary Source="ms-appx:///Microsoft.UI.Xaml/DensityStyles/Compact.xaml" />
925935
</ListView.Resources>

0 commit comments

Comments
 (0)