Skip to content
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
6 changes: 3 additions & 3 deletions src/Files.App/Helpers/FilePropertiesHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Windows.ApplicationModel;
using Windows.Foundation.Metadata;
using Windows.Graphics;
using static Files.App.Views.Properties;
using static Files.App.Views.Properties.MainPropertiesPage;

namespace Files.App.Helpers
{
Expand Down Expand Up @@ -84,7 +84,7 @@ public static async Task OpenPropertiesWindowAsync(object item, IShellPage assoc

appWindow.SetIcon(LogoPath);

if (frame.Content is Properties properties)
if (frame.Content is Views.Properties.MainPropertiesPage properties)
properties.AppWindow = appWindow;

appWindow.Show();
Expand Down Expand Up @@ -118,7 +118,7 @@ void Navigate(Frame frame)
Item = item,
AppInstanceArgument = associatedInstance,
};
frame.Navigate(typeof(Properties), argument, new SuppressNavigationTransitionInfo());
frame.Navigate(typeof(Views.Properties.MainPropertiesPage), argument, new SuppressNavigationTransitionInfo());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Files.App.ViewModels.Properties
{
public abstract class PropertiesTab : Page, IDisposable
public abstract class BasePropertiesPage : Page, IDisposable
{
public IShellPage AppInstance = null;

Expand All @@ -28,7 +28,7 @@ protected virtual void Properties_Loaded(object sender, RoutedEventArgs e)

protected override void OnNavigatedTo(NavigationEventArgs e)
{
var np = e.Parameter as Views.Properties.PropertyNavParam;
var np = e.Parameter as Views.Properties.MainPropertiesPage.PropertyNavParam;

AppInstance = np.AppInstanceArgument;
ViewModel = new SelectedItemsPropertiesViewModel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Files.App.ViewModels.Properties
{
public class CompatibilityProperties : ObservableObject
public class CompatibilityViewModel : ObservableObject
{
public ListedItem Item { get; }

Expand Down Expand Up @@ -149,7 +149,7 @@ public LocalizedEnumHelper<HighDpiOverride> HighDpiOverride

public IRelayCommand RunTroubleshooterCommand { get; set; }

public CompatibilityProperties(ListedItem item)
public CompatibilityViewModel(ListedItem item)
{
Item = item;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

namespace Files.App.ViewModels.Properties
{
public class SecurityProperties : ObservableObject
public class SecurityViewModel : ObservableObject
{
public ListedItem Item { get; }

public SecurityProperties(ListedItem item)
public SecurityViewModel(ListedItem item)
{
Item = item;

Expand All @@ -25,7 +25,7 @@ public SecurityProperties(ListedItem item)
InitCommands();
}

public SecurityProperties(DriveItem item)
public SecurityViewModel(DriveItem item)
{
Item = new ListedItem()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<vm:PropertiesTab
x:Class="Files.App.Views.PropertiesCompatibility"
<vm:BasePropertiesPage
x:Class="Files.App.Views.Properties.CompatibilityPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Files.App.Converters"
Expand All @@ -11,7 +11,7 @@
Loaded="Properties_Loaded"
mc:Ignorable="d">

<vm:PropertiesTab.Resources>
<vm:BasePropertiesPage.Resources>
<ResourceDictionary>

<ResourceDictionary.MergedDictionaries>
Expand All @@ -22,7 +22,7 @@
<converters:NullToTrueConverter x:Key="NullToFalseConverter" Inverse="True" />

</ResourceDictionary>
</vm:PropertiesTab.Resources>
</vm:BasePropertiesPage.Resources>

<ScrollViewer>
<StackPanel Padding="12" Spacing="4">
Expand Down Expand Up @@ -107,4 +107,4 @@

</StackPanel>
</ScrollViewer>
</vm:PropertiesTab>
</vm:BasePropertiesPage>
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
using Microsoft.UI.Xaml.Navigation;
using System.Threading.Tasks;

namespace Files.App.Views
namespace Files.App.Views.Properties
{
public sealed partial class PropertiesCompatibility : PropertiesTab
public sealed partial class CompatibilityPage : BasePropertiesPage
{
public CompatibilityProperties CompatibilityProperties { get; set; }
public CompatibilityViewModel CompatibilityProperties { get; set; }

public PropertiesCompatibility()
public CompatibilityPage()
{
InitializeComponent();
}

protected override void OnNavigatedTo(NavigationEventArgs e)
{
var np = e.Parameter as Views.Properties.PropertyNavParam;
var np = e.Parameter as Views.Properties.MainPropertiesPage.PropertyNavParam;

if (np.navParameter is ListedItem listedItem)
{
CompatibilityProperties = new CompatibilityProperties(listedItem);
CompatibilityProperties = new CompatibilityViewModel(listedItem);
}

base.OnNavigatedTo(e);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<vm:PropertiesTab
x:Class="Files.App.Views.PropertiesCustomization"
<vm:BasePropertiesPage
x:Class="Files.App.Views.Properties.CustomizationPage"
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"
Expand All @@ -12,7 +12,7 @@
DataContext="{x:Bind CustomizationViewModel, Mode=OneWay}"
mc:Ignorable="d">

<vm:PropertiesTab.Resources>
<vm:BasePropertiesPage.Resources>
<ResourceDictionary>

<ResourceDictionary.MergedDictionaries>
Expand All @@ -22,7 +22,7 @@
<toolkitconverters:BoolNegationConverter x:Key="BoolNegationConverter" />

</ResourceDictionary>
</vm:PropertiesTab.Resources>
</vm:BasePropertiesPage.Resources>

<Grid Padding="12">

Expand Down Expand Up @@ -125,4 +125,4 @@
</Grid>

</Grid>
</vm:PropertiesTab>
</vm:BasePropertiesPage>
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
using System.IO;
using System.Threading.Tasks;

namespace Files.App.Views
namespace Files.App.Views.Properties
{
public sealed partial class PropertiesCustomization : PropertiesTab
public sealed partial class CustomizationPage : BasePropertiesPage
{
private CustomizationViewModel CustomizationViewModel { get; set; }

public PropertiesCustomization()
public CustomizationPage()
{
InitializeComponent();
}
Expand Down Expand Up @@ -44,7 +44,7 @@ private async void PickDllButton_Click(object sender, RoutedEventArgs e)
picker.FileTypeFilter.Add(".ico");

// WINUI3: Create and initialize new window
var parentWindowId = ((Properties)((Frame)XamlRoot.Content).Content).AppWindow.Id;
var parentWindowId = ((Views.Properties.MainPropertiesPage)((Frame)XamlRoot.Content).Content).AppWindow.Id;
var handle = Microsoft.UI.Win32Interop.GetWindowFromWindowId(parentWindowId);
WinRT.Interop.InitializeWithWindow.Initialize(picker, handle);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<vm:PropertiesTab
x:Class="Files.App.Views.PropertiesDetails"
<vm:BasePropertiesPage
x:Class="Files.App.Views.Properties.DetailsPage"
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"
Expand Down Expand Up @@ -109,4 +109,4 @@

</Grid>
</ScrollViewer>
</vm:PropertiesTab>
</vm:BasePropertiesPage>
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
using System.Diagnostics;
using System.Threading.Tasks;

namespace Files.App.Views
namespace Files.App.Views.Properties
{
public sealed partial class PropertiesDetails : PropertiesTab
public sealed partial class DetailsPage : BasePropertiesPage
{
public PropertiesDetails()
public DetailsPage()
{
InitializeComponent();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<vm:PropertiesTab
x:Class="Files.App.Views.PropertiesGeneral"
<vm:BasePropertiesPage
x:Class="Files.App.Views.Properties.GeneralPage"
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"
Expand All @@ -11,7 +11,7 @@
Loaded="Properties_Loaded"
mc:Ignorable="d">

<vm:PropertiesTab.Resources>
<vm:BasePropertiesPage.Resources>
<ResourceDictionary>

<ResourceDictionary.MergedDictionaries>
Expand All @@ -33,7 +33,7 @@
<toolkitconverters:BoolNegationConverter x:Key="BoolNegationConverter" />

</ResourceDictionary>
</vm:PropertiesTab.Resources>
</vm:BasePropertiesPage.Resources>

<ScrollViewer>
<StackPanel
Expand Down Expand Up @@ -569,4 +569,4 @@

</StackPanel>
</ScrollViewer>
</vm:PropertiesTab>
</vm:BasePropertiesPage>
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
using System.Threading.Tasks;
using Windows.Storage;

namespace Files.App.Views
namespace Files.App.Views.Properties
{
public sealed partial class PropertiesGeneral : PropertiesTab
public sealed partial class GeneralPage : BasePropertiesPage
{
private readonly Regex letterRegex = new(@"\s*\(\w:\)$");

public PropertiesGeneral() => InitializeComponent();
public GeneralPage() => InitializeComponent();

public override async Task<bool> SaveChangesAsync()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<vm:PropertiesTab
x:Class="Files.App.Views.PropertiesLibrary"
<vm:BasePropertiesPage
x:Class="Files.App.Views.Properties.LibraryPage"
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:helpers="using:Files.App.Helpers"
xmlns:local="using:Files.App.Views.Properties"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitconverters="using:CommunityToolkit.WinUI.UI.Converters"
xmlns:vm="using:Files.App.ViewModels.Properties"
Expand Down Expand Up @@ -95,7 +96,7 @@
SelectionMode="Single">

<ListView.ItemTemplate>
<DataTemplate xmlns:vm="using:Files.App.Views" x:DataType="vm:LibraryFolder">
<DataTemplate x:DataType="local:LibraryFolder">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="36" />
Expand Down Expand Up @@ -134,4 +135,4 @@

</StackPanel>
</ScrollViewer>
</vm:PropertiesTab>
</vm:BasePropertiesPage>
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
using System.Windows.Input;
using Windows.Storage.Pickers;

namespace Files.App.Views
namespace Files.App.Views.Properties
{
public sealed partial class PropertiesLibrary : PropertiesTab, INotifyPropertyChanged
public sealed partial class LibraryPage : BasePropertiesPage, INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;

Expand Down Expand Up @@ -66,7 +66,7 @@ public bool IsPinned
public ICommand SetDefaultLocationCommand { get; }
public ICommand RemoveLocationCommand { get; }

public PropertiesLibrary()
public LibraryPage()
{
InitializeComponent();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Page
x:Class="Files.App.Views.Properties"
x:Class="Files.App.Views.Properties.MainPropertiesPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:convers="using:Files.App.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="using:Files.App.Helpers"
xmlns:local="using:Files.App.Views"
xmlns:local="using:Files.App.Views.Properties"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitconvers="using:CommunityToolkit.WinUI.UI.Converters"
Background="{ThemeResource App.Theme.BackgroundBrush}"
Expand Down
Loading