Skip to content

Auto select first item in user list for permissions #8794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/Files.Uwp/Views/Pages/PropertiesSecurity.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<local:PropertiesTab
x:Class="Files.Views.PropertiesSecurity"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:perm="using:Files.Filesystem.Permissions"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="using:Files.Helpers"
xmlns:local="using:Files.ViewModels.Properties"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:perm="using:Files.Filesystem.Permissions"
d:Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
Loaded="Properties_Loaded"
mc:Ignorable="d">
Expand Down Expand Up @@ -92,12 +92,13 @@
HorizontalAlignment="Stretch"
x:Load="{x:Bind SecurityProperties.FilePermissions.CanReadFilePermissions, Mode=OneWay}"
ItemsSource="{x:Bind SecurityProperties.FilePermissions.RulesForUsers, Mode=OneWay}"
SelectedIndex="0"
SelectedItem="{x:Bind SecurityProperties.SelectedRuleForUser, Mode=TwoWay}"
SelectionMode="Single">
<ListView.ItemContainerStyle>
<Style BasedOn="{StaticResource DefaultListViewItemStyle}" TargetType="ListViewItem">
<Setter Property="MinHeight" Value="40" />
<Setter Property="Height" Value="40" />
<Setter Property="MinHeight" Value="1" />
<Setter Property="Height" Value="{ThemeResource ListItemHeight}" />
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemTemplate>
Expand Down
18 changes: 8 additions & 10 deletions src/Files.Uwp/Views/Pages/PropertiesSecurityAdvanced.xaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Page
x:Class="Files.Views.PropertiesSecurityAdvanced"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:perm="using:Files.Filesystem.Permissions"
xmlns:helpers="using:Files.Helpers"
xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Behaviors"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="using:Files.Helpers"
xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:perm="using:Files.Filesystem.Permissions"
d:Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
d:Height="550"
d:Width="850"
Expand Down Expand Up @@ -186,8 +186,8 @@
</i:Interaction.Behaviors>
<ListView.ItemContainerStyle>
<Style BasedOn="{StaticResource DefaultListViewItemStyle}" TargetType="ListViewItem">
<Setter Property="MinHeight" Value="40" />
<Setter Property="Height" Value="40" />
<Setter Property="MinHeight" Value="1" />
<Setter Property="Height" Value="{ThemeResource ListItemHeight}" />
</Style>
</ListView.ItemContainerStyle>
<ListView.Header>
Expand Down Expand Up @@ -477,9 +477,7 @@
Command="{x:Bind ViewModel.ReplaceChildPermissionsCommand}"
ToolTipService.ToolTip="{helpers:ResourceString Name=SecurityAdvancedReplaceChildPermissions2/ToolTipService/ToolTip}"
Visibility="Collapsed">
<TextBlock
Text="{helpers:ResourceString Name=SecurityAdvancedReplaceChildPermissions/Text}"
TextTrimming="CharacterEllipsis" />
<TextBlock Text="{helpers:ResourceString Name=SecurityAdvancedReplaceChildPermissions/Text}" TextTrimming="CharacterEllipsis" />
</Button>
</Grid>
</Grid>
Expand Down