Skip to content

Commit 10376cd

Browse files
committed
Fix crash
1 parent bd21770 commit 10376cd

File tree

2 files changed

+40
-51
lines changed

2 files changed

+40
-51
lines changed

Files/Views/LayoutModes/GenericFileBrowser.xaml

+21-30
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
x:Class="Files.Views.LayoutModes.GenericFileBrowser"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
6-
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
7-
xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Behaviors"
85
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
96
xmlns:controlsprimitives="using:Microsoft.Toolkit.Uwp.UI.Controls.Primitives"
107
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
@@ -18,7 +15,6 @@
1815
xmlns:i="using:Microsoft.Xaml.Interactivity"
1916
xmlns:icore="using:Microsoft.Xaml.Interactions.Core"
2017
xmlns:xh="using:Files.Helpers.XamlHelpers"
21-
xmlns:usercontrols="using:Files.UserControls"
2218
NavigationCacheMode="Enabled"
2319
mc:Ignorable="d">
2420
<i:Interaction.Behaviors>
@@ -44,11 +40,6 @@
4440
x:Name="BaseLayoutContextFlyout"
4541
AreOpenCloseAnimationsEnabled="{x:Bind AppSettings.AreRightClickContentMenuAnimationsEnabled, Mode=OneWay}"
4642
Opening="RightClickContextMenu_Opening">
47-
<i:Interaction.Behaviors>
48-
<icore:EventTriggerBehavior EventName="Opening">
49-
<icore:InvokeCommandAction Command="{x:Bind CommandsViewModel.GridViewSizeIncreaseCommand}"/>
50-
</icore:EventTriggerBehavior>
51-
</i:Interaction.Behaviors>
5243
<MenuFlyoutSubItem
5344
x:Name="SortByEmptySpace"
5445
x:Uid="BaseLayoutContextFlyoutSortBy"
@@ -823,26 +814,26 @@
823814
</i:Interaction.Behaviors>
824815
</KeyboardAccelerator>
825816
</Grid.KeyboardAccelerators>
826-
<Interactivity:Interaction.Behaviors>
827-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="True">
828-
<Core:ChangePropertyAction
817+
<i:Interaction.Behaviors>
818+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="True">
819+
<icore:ChangePropertyAction
829820
PropertyName="ContextFlyout"
830821
TargetObject="{Binding ElementName=RootGrid}"
831822
Value="{StaticResource BaseLayoutRecycleBinContextFlyout}" />
832-
</Core:DataTriggerBehavior>
833-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="False">
834-
<Core:ChangePropertyAction
823+
</icore:DataTriggerBehavior>
824+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="False">
825+
<icore:ChangePropertyAction
835826
PropertyName="ContextFlyout"
836827
TargetObject="{Binding ElementName=RootGrid}"
837828
Value="{StaticResource BaseLayoutContextFlyout}" />
838-
</Core:DataTriggerBehavior>
839-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeSearchResults, Mode=OneWay}" Value="True">
840-
<Core:ChangePropertyAction
829+
</icore:DataTriggerBehavior>
830+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeSearchResults, Mode=OneWay}" Value="True">
831+
<icore:ChangePropertyAction
841832
PropertyName="ContextFlyout"
842833
TargetObject="{Binding ElementName=RootGrid}"
843834
Value="{x:Null}" />
844-
</Core:DataTriggerBehavior>
845-
</Interactivity:Interaction.Behaviors>
835+
</icore:DataTriggerBehavior>
836+
</i:Interaction.Behaviors>
846837
<muxc:ProgressBar
847838
x:Name="progBar"
848839
VerticalAlignment="Top"
@@ -954,7 +945,7 @@
954945
<Setter Property="Background" Value="{ThemeResource DataGridColumnHeaderBackgroundColor}" />
955946
</Style>
956947
</controls:DataGrid.ColumnHeaderStyle>
957-
<Interactivity:Interaction.Behaviors>
948+
<i:Interaction.Behaviors>
958949
<icore:EventTriggerBehavior EventName="Drop">
959950
<icore:InvokeCommandAction Command="{x:Bind CommandsViewModel.DropCommand}"/>
960951
</icore:EventTriggerBehavior>
@@ -964,27 +955,27 @@
964955
<icore:EventTriggerBehavior EventName="PointerPressed">
965956
<icore:InvokeCommandAction Command="{x:Bind CommandsViewModel.ItemPointerPressedCommand}"/>
966957
</icore:EventTriggerBehavior>
967-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="True">
968-
<Core:ChangePropertyAction
958+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="True">
959+
<icore:ChangePropertyAction
969960
PropertyName="RowStyle"
970961
TargetObject="{Binding ElementName=AllView}"
971962
Value="{StaticResource DataGridRowRecycleBinContextFlyout}" />
972-
<Core:ChangePropertyAction
963+
<icore:ChangePropertyAction
973964
PropertyName="DisplayIndex"
974965
TargetObject="{Binding ElementName=dateColumn}"
975966
Value="7" />
976-
</Core:DataTriggerBehavior>
977-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="False">
978-
<Core:ChangePropertyAction
967+
</icore:DataTriggerBehavior>
968+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="False">
969+
<icore:ChangePropertyAction
979970
PropertyName="RowStyle"
980971
TargetObject="{Binding ElementName=AllView}"
981972
Value="{StaticResource DataGridRowStandardContextFlyout}" />
982-
<Core:ChangePropertyAction
973+
<icore:ChangePropertyAction
983974
PropertyName="DisplayIndex"
984975
TargetObject="{Binding ElementName=dateColumn}"
985976
Value="5" />
986-
</Core:DataTriggerBehavior>
987-
</Interactivity:Interaction.Behaviors>
977+
</icore:DataTriggerBehavior>
978+
</i:Interaction.Behaviors>
988979
<controls:DataGrid.Columns>
989980
<controls:DataGridTemplateColumn
990981
x:Name="iconColumn"

Files/Views/LayoutModes/GridViewBrowser.xaml

+19-21
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
x:Class="Files.Views.LayoutModes.GridViewBrowser"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
6-
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
75
xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
86
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
97
xmlns:converters1="using:Files.Converters"
@@ -1088,26 +1086,26 @@
10881086
</i:Interaction.Behaviors>
10891087
</KeyboardAccelerator>
10901088
</Grid.KeyboardAccelerators>
1091-
<Interactivity:Interaction.Behaviors>
1092-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="True">
1093-
<Core:ChangePropertyAction
1089+
<i:Interaction.Behaviors>
1090+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="True">
1091+
<icore:ChangePropertyAction
10941092
PropertyName="ContextFlyout"
10951093
TargetObject="{Binding ElementName=RootGrid}"
10961094
Value="{StaticResource BaseLayoutRecycleBinContextFlyout}" />
1097-
</Core:DataTriggerBehavior>
1098-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="False">
1099-
<Core:ChangePropertyAction
1095+
</icore:DataTriggerBehavior>
1096+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="False">
1097+
<icore:ChangePropertyAction
11001098
PropertyName="ContextFlyout"
11011099
TargetObject="{Binding ElementName=RootGrid}"
11021100
Value="{StaticResource BaseLayoutContextFlyout}" />
1103-
</Core:DataTriggerBehavior>
1104-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeSearchResults, Mode=OneWay}" Value="True">
1105-
<Core:ChangePropertyAction
1101+
</icore:DataTriggerBehavior>
1102+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeSearchResults, Mode=OneWay}" Value="True">
1103+
<icore:ChangePropertyAction
11061104
PropertyName="ContextFlyout"
11071105
TargetObject="{Binding ElementName=RootGrid}"
11081106
Value="{x:Null}" />
1109-
</Core:DataTriggerBehavior>
1110-
</Interactivity:Interaction.Behaviors>
1107+
</icore:DataTriggerBehavior>
1108+
</i:Interaction.Behaviors>
11111109
<muxc:ProgressBar
11121110
x:Name="progBar"
11131111
VerticalAlignment="Top"
@@ -1159,26 +1157,26 @@
11591157
</ResourceDictionary.ThemeDictionaries>
11601158
</ResourceDictionary>
11611159
</GridView.Resources>
1162-
<Interactivity:Interaction.Behaviors>
1160+
<i:Interaction.Behaviors>
11631161
<icore:EventTriggerBehavior EventName="Drop">
11641162
<icore:InvokeCommandAction Command="{x:Bind CommandsViewModel.DropCommand}"/>
11651163
</icore:EventTriggerBehavior>
11661164
<icore:EventTriggerBehavior EventName="DragEnter">
11671165
<icore:InvokeCommandAction Command="{x:Bind CommandsViewModel.DragEnterCommand}"/>
11681166
</icore:EventTriggerBehavior>
1169-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="True">
1170-
<Core:ChangePropertyAction
1167+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="True">
1168+
<icore:ChangePropertyAction
11711169
PropertyName="ItemContainerStyle"
11721170
TargetObject="{Binding ElementName=FileList}"
11731171
Value="{StaticResource GridViewItemRecycleBinContextFlyout}" />
1174-
</Core:DataTriggerBehavior>
1175-
<Core:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="False">
1176-
<Core:ChangePropertyAction
1172+
</icore:DataTriggerBehavior>
1173+
<icore:DataTriggerBehavior Binding="{x:Bind InstanceViewModel.IsPageTypeRecycleBin, Mode=OneWay}" Value="False">
1174+
<icore:ChangePropertyAction
11771175
PropertyName="ItemContainerStyle"
11781176
TargetObject="{Binding ElementName=FileList}"
11791177
Value="{StaticResource GridViewItemStandardContextFlyout}" />
1180-
</Core:DataTriggerBehavior>
1181-
</Interactivity:Interaction.Behaviors>
1178+
</icore:DataTriggerBehavior>
1179+
</i:Interaction.Behaviors>
11821180
</GridView>
11831181

11841182
<Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

0 commit comments

Comments
 (0)