Skip to content

Feature: Display placeholder when sidebar sections are all hidden #17039

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 2 commits into from
Apr 22, 2025
Merged
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
8 changes: 8 additions & 0 deletions src/Files.App.Controls/Sidebar/SidebarView.Properties.cs
Original file line number Diff line number Diff line change
@@ -21,6 +21,14 @@ public UIElement InnerContent
public static readonly DependencyProperty InnerContentProperty =
DependencyProperty.Register(nameof(InnerContent), typeof(UIElement), typeof(SidebarView), new PropertyMetadata(null));

public UIElement SidebarContent
{
get { return (UIElement)GetValue(SidebarContentProperty); }
set { SetValue(SidebarContentProperty, value); }
}
public static readonly DependencyProperty SidebarContentProperty =
DependencyProperty.Register("SidebarContent", typeof(UIElement), typeof(SidebarView), new PropertyMetadata(null));

public UIElement Footer
{
get { return (UIElement)GetValue(FooterProperty); }
9 changes: 9 additions & 0 deletions src/Files.App.Controls/Sidebar/SidebarView.xaml
Original file line number Diff line number Diff line change
@@ -57,6 +57,15 @@
<CompositeTransform x:Name="PaneColumnGridTransform" />
</Grid.RenderTransform>

<!-- Content -->
<ContentPresenter
Grid.RowSpan="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
Content="{x:Bind SidebarContent, Mode=OneWay}" />

<!-- Menu Items -->
<ItemsRepeaterScrollHost HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<ScrollViewer
33 changes: 33 additions & 0 deletions src/Files.App/Assets/Sidebar/EmptySidebar_100_ThemeDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions src/Files.App/Assets/Sidebar/EmptySidebar_100_ThemeLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions src/Files.App/Assets/Sidebar/EmptySidebar_200_ThemeDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions src/Files.App/Assets/Sidebar/EmptySidebar_200_ThemeLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/Files.App/Assets/Sidebar/EmptySidebar_48_ThemeDark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/Files.App/Assets/Sidebar/EmptySidebar_48_ThemeLight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
@@ -3508,7 +3508,7 @@
<data name="StatusCenter_GitCloneInProgress_SubHeader" xml:space="preserve">
<value>Cloning {0} from "{1}" to "{2}"</value>
<comment>Shown in a StatusCenter card.</comment>
</data>
</data>
<data name="StatusCenter_InstallFontCanceled_Header" xml:space="preserve">
<value>Canceled installing {0} fonts</value>
<comment>Shown in a StatusCenter card.</comment>
@@ -3540,7 +3540,7 @@
<data name="StatusCenter_InstallFontInProgress_SubHeader" xml:space="preserve">
<value>Installing {0} font(s) from "{1}"</value>
<comment>Shown in a StatusCenter card.</comment>
</data>
</data>
<data name="StatusCenter_CopyCanceled_Header" xml:space="preserve">
<value>Canceled copying {0} item(s) to "{1}"</value>
<comment>Shown in a StatusCenter card.</comment>
@@ -4193,4 +4193,7 @@
<data name="EnableOmnibar" xml:space="preserve">
<value>Enable Omnibar</value>
</data>
<data name="SectionsHiddenMessage" xml:space="preserve">
<value>You can add sections to the sidebar by right-clicking and selecting the sections you want to add.</value>
</data>
</root>
18 changes: 18 additions & 0 deletions src/Files.App/ViewModels/UserControls/SidebarViewModel.cs
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@ public SidebarDisplayMode SidebarDisplayMode
if (SetProperty(ref sidebarDisplayMode, value))
{
OnPropertyChanged(nameof(IsSidebarCompactSize));
OnPropertyChanged(nameof(AreSectionsHidden));
IsSidebarOpen = sidebarDisplayMode == SidebarDisplayMode.Expanded;
UpdateTabControlMargin();
}
@@ -134,6 +135,16 @@ public bool IsSidebarOpen
}
}

public bool AreSectionsHidden =>
!ShowPinnedFoldersSection &&
!ShowLibrarySection &&
!ShowDrivesSection &&
!ShowCloudDrivesSection &&
!ShowNetworkSection &&
(!ShowWslSection || WSLDistroManager.Distros.Any() == false) &&
!ShowFileTagsSection &&
SidebarDisplayMode is not SidebarDisplayMode.Compact;

public bool ShowPinnedFoldersSection
{
get => UserSettingsService.GeneralSettingsService.ShowPinnedSection;
@@ -635,30 +646,37 @@ private async void UserSettingsService_OnSettingChangedEvent(object sender, Sett
case nameof(UserSettingsService.GeneralSettingsService.ShowPinnedSection):
await UpdateSectionVisibilityAsync(SectionType.Pinned, ShowPinnedFoldersSection);
OnPropertyChanged(nameof(ShowPinnedFoldersSection));
OnPropertyChanged(nameof(AreSectionsHidden));
break;
case nameof(UserSettingsService.GeneralSettingsService.ShowLibrarySection):
await UpdateSectionVisibilityAsync(SectionType.Library, ShowLibrarySection);
OnPropertyChanged(nameof(ShowLibrarySection));
OnPropertyChanged(nameof(AreSectionsHidden));
break;
case nameof(UserSettingsService.GeneralSettingsService.ShowCloudDrivesSection):
await UpdateSectionVisibilityAsync(SectionType.CloudDrives, ShowCloudDrivesSection);
OnPropertyChanged(nameof(ShowCloudDrivesSection));
OnPropertyChanged(nameof(AreSectionsHidden));
break;
case nameof(UserSettingsService.GeneralSettingsService.ShowDrivesSection):
await UpdateSectionVisibilityAsync(SectionType.Drives, ShowDrivesSection);
OnPropertyChanged(nameof(ShowDrivesSection));
OnPropertyChanged(nameof(AreSectionsHidden));
break;
case nameof(UserSettingsService.GeneralSettingsService.ShowNetworkSection):
await UpdateSectionVisibilityAsync(SectionType.Network, ShowNetworkSection);
OnPropertyChanged(nameof(ShowNetworkSection));
OnPropertyChanged(nameof(AreSectionsHidden));
break;
case nameof(UserSettingsService.GeneralSettingsService.ShowWslSection):
await UpdateSectionVisibilityAsync(SectionType.WSL, ShowWslSection);
OnPropertyChanged(nameof(ShowWslSection));
OnPropertyChanged(nameof(AreSectionsHidden));
break;
case nameof(UserSettingsService.GeneralSettingsService.ShowFileTagsSection):
await UpdateSectionVisibilityAsync(SectionType.FileTag, ShowFileTagsSection);
OnPropertyChanged(nameof(ShowFileTagsSection));
OnPropertyChanged(nameof(AreSectionsHidden));
break;
}
}
85 changes: 85 additions & 0 deletions src/Files.App/Views/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -31,6 +31,24 @@
<ResourceDictionary Source="ms-appx:///Styles/DefaultGridSplitterStyle.xaml" />
</ResourceDictionary.MergedDictionaries>

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<ImageSource x:Key="EmptySidebar.48">ms-appx:///Assets/Sidebar/EmptySidebar_48_ThemeLight.svg</ImageSource>
<ImageSource x:Key="EmptySidebar.100">ms-appx:///Assets/Sidebar/EmptySidebar_100_ThemeLight.svg</ImageSource>
<ImageSource x:Key="EmptySidebar.200">ms-appx:///Assets/Sidebar/EmptySidebar_200_ThemeLight.svg</ImageSource>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<ImageSource x:Key="EmptySidebar.48">ms-appx:///Assets/Sidebar/EmptySidebar_48_ThemeDark.svg</ImageSource>
<ImageSource x:Key="EmptySidebar.100">ms-appx:///Assets/Sidebar/EmptySidebar_100_ThemeDark.svg</ImageSource>
<ImageSource x:Key="EmptySidebar.200">ms-appx:///Assets/Sidebar/EmptySidebar_200_ThemeDark.svg</ImageSource>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<ImageSource x:Key="EmptySidebar.48">ms-appx:///Assets/Sidebar/EmptySidebar_48_ThemeDark.svg</ImageSource>
<ImageSource x:Key="EmptySidebar.100">ms-appx:///Assets/Sidebar/EmptySidebar_100_ThemeDark.svg</ImageSource>
<ImageSource x:Key="EmptySidebar.200">ms-appx:///Assets/Sidebar/EmptySidebar_200_ThemeDark.svg</ImageSource>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

<x:Boolean x:Key="True">True</x:Boolean>
<x:Boolean x:Key="False">False</x:Boolean>

@@ -259,6 +277,32 @@
</Grid>
</controls:SidebarView.InnerContent>

<!-- Sidebar Content -->
<controls:SidebarView.SidebarContent>
<StackPanel
x:Name="SidebarContent"
Padding="16,0,16,0"
VerticalAlignment="Center"
Orientation="Vertical"
Spacing="16"
Visibility="{x:Bind SidebarAdaptiveViewModel.AreSectionsHidden, Mode=OneWay}">

<Image
x:Name="EmptySidebarImage"
MaxHeight="48"
Source="{ThemeResource EmptySidebar.48}" />

<TextBlock
MaxWidth="240"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
Style="{StaticResource App.Theme.CaptionTextBlockStyle}"
Text="{helpers:ResourceString Name=SectionsHiddenMessage}"
TextAlignment="Center" />

</StackPanel>
</controls:SidebarView.SidebarContent>

<!-- Footer -->
<controls:SidebarView.Footer>
<StackPanel Padding="4" Spacing="4">
<Border
@@ -322,6 +366,46 @@
</controls:SidebarView>

<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="SidebarWidthStates">
<VisualState x:Name="SmallSidebarWidthState">
<VisualState.Setters>
<Setter Target="EmptySidebarImage.MaxHeight" Value="48" />
<Setter Target="EmptySidebarImage.Source" Value="{ThemeResource EmptySidebar.48}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="MediumSidebarWidthState">
<VisualState.Setters>
<Setter Target="EmptySidebarImage.MaxHeight" Value="100" />
<Setter Target="EmptySidebarImage.Source" Value="{ThemeResource EmptySidebar.100}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="LargeSidebarWidthState">
<VisualState.Setters>
<Setter Target="EmptySidebarImage.MaxHeight" Value="200" />
<Setter Target="EmptySidebarImage.Source" Value="{ThemeResource EmptySidebar.200}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>

<VisualStateGroup x:Name="WindowHeightStates">
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger x:Name="SmallHeightAdaptiveTrigger" MinWindowHeight="440" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="EmptySidebarImage.Visibility" Value="Visible" />
</VisualState.Setters>
</VisualState>
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger x:Name="MediumHeightAdaptiveTrigger" MinWindowHeight="0" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="EmptySidebarImage.Visibility" Value="Collapsed" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>

<VisualStateGroup>
<VisualState>
<VisualState.StateTriggers>
@@ -337,6 +421,7 @@
</VisualState.Setters>
</VisualState>
</VisualStateGroup>

<VisualStateGroup>
<VisualState x:Name="NormalSidebarState">
<VisualState.StateTriggers>
15 changes: 15 additions & 0 deletions src/Files.App/Views/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -55,6 +55,8 @@ public MainPage()
_updateDateDisplayTimer = DispatcherQueue.CreateTimer();
_updateDateDisplayTimer.Interval = TimeSpan.FromSeconds(1);
_updateDateDisplayTimer.Tick += UpdateDateDisplayTimer_Tick;

ApplySidebarWidthState();
}

private async Task PromptForReviewAsync()
@@ -120,6 +122,9 @@ private void UserSettingsService_OnSettingChangedEvent(object? sender, SettingCh
case nameof(IInfoPaneSettingsService.IsInfoPaneEnabled):
LoadPaneChanged();
break;
case nameof(IAppearanceSettingsService.SidebarWidth):
ApplySidebarWidthState();
break;
}
}

@@ -434,6 +439,16 @@ private void PaneSplitter_ManipulationCompleted(object sender, ManipulationCompl
this.ChangeCursor(InputSystemCursor.Create(InputSystemCursorShape.Arrow));
}

private void ApplySidebarWidthState()
{
if (UserSettingsService.AppearanceSettingsService.SidebarWidth > 340)
VisualStateManager.GoToState(this, "LargeSidebarWidthState", true);
else if (UserSettingsService.AppearanceSettingsService.SidebarWidth > 280)
VisualStateManager.GoToState(this, "MediumSidebarWidthState", true);
else
VisualStateManager.GoToState(this, "SmallSidebarWidthState", true);
}

private void LoadPaneChanged()
{
try

Unchanged files with check annotations Beta

private BladeItem OwnerBladeItem
{
get { return this.Owner as BladeItem; }

Check warning on line 33 in src/Files.App.Controls/BladeView/BladeItemAutomationPeer.cs

GitHub Actions / build (Release, arm64)

Possible null reference return.
}
/// <summary>
SetHasContent( false );
}
UpdateContent( newContent );

Check warning on line 175 in src/Files.App.Controls/Toolbar/ToolbarToggleButton/ToolbarToggleButton.cs

GitHub Actions / build (Release, arm64)

Possible null reference argument for parameter 'newContent' in 'void ToolbarToggleButton.UpdateContent(object newContent)'.

Check warning on line 175 in src/Files.App.Controls/Toolbar/ToolbarToggleButton/ToolbarToggleButton.cs

GitHub Actions / build (Release, x64)

Possible null reference argument for parameter 'newContent' in 'void ToolbarToggleButton.UpdateContent(object newContent)'.

Check warning on line 175 in src/Files.App.Controls/Toolbar/ToolbarToggleButton/ToolbarToggleButton.cs

GitHub Actions / build (Debug, x64)

Possible null reference argument for parameter 'newContent' in 'void ToolbarToggleButton.UpdateContent(object newContent)'.

Check warning on line 175 in src/Files.App.Controls/Toolbar/ToolbarToggleButton/ToolbarToggleButton.cs

GitHub Actions / build (Debug, arm64)

Possible null reference argument for parameter 'newContent' in 'void ToolbarToggleButton.UpdateContent(object newContent)'.
}
#endregion
_ = PInvoke.RoInitialize(RO_INIT_TYPE.RO_INIT_MULTITHREADED);
var classIds = typeof(Program).Assembly.GetTypes()

Check warning on line 28 in src/Files.App.Server/Program.cs

GitHub Actions / build (Release, arm64)

Using member 'System.Reflection.Assembly.GetTypes()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed.

Check warning on line 28 in src/Files.App.Server/Program.cs

GitHub Actions / build (Release, x64)

Using member 'System.Reflection.Assembly.GetTypes()' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types might be removed.
.Where(t => t.IsSealed && t.IsPublic && t.IsClass)
.Select(t => t.FullName!)
.Where(name => name.StartsWith("Files.App.Server.", StringComparison.Ordinal))
var newDocument = context.Document.WithSyntaxRoot(newRoot);
context.RegisterCodeFix(
CodeAction.Create(

Check warning on line 57 in src/Files.Core.SourceGenerator/CodeFixProviders/StringsPropertyCodeFixProvider.cs

GitHub Actions / build (Release, arm64)

Provide an explicit argument for optional parameter 'equivalenceKey', which is non-null and unique for each kind of code action created by this fixer

Check warning on line 57 in src/Files.Core.SourceGenerator/CodeFixProviders/StringsPropertyCodeFixProvider.cs

GitHub Actions / build (Release, x64)

Provide an explicit argument for optional parameter 'equivalenceKey', which is non-null and unique for each kind of code action created by this fixer

Check warning on line 57 in src/Files.Core.SourceGenerator/CodeFixProviders/StringsPropertyCodeFixProvider.cs

GitHub Actions / build (Debug, x64)

Provide an explicit argument for optional parameter 'equivalenceKey', which is non-null and unique for each kind of code action created by this fixer

Check warning on line 57 in src/Files.Core.SourceGenerator/CodeFixProviders/StringsPropertyCodeFixProvider.cs

GitHub Actions / build (Debug, arm64)

Provide an explicit argument for optional parameter 'equivalenceKey', which is non-null and unique for each kind of code action created by this fixer
CodeFixProviderTitle,
c => Task.FromResult(newDocument),
null),
/// <summary>
/// Generates properties for strings based on resource files.
/// </summary>
[Generator]

Check warning on line 13 in src/Files.Core.SourceGenerator/Generators/StringsPropertyGenerator.cs

GitHub Actions / build (Release, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 13 in src/Files.Core.SourceGenerator/Generators/StringsPropertyGenerator.cs

GitHub Actions / build (Release, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 13 in src/Files.Core.SourceGenerator/Generators/StringsPropertyGenerator.cs

GitHub Actions / build (Debug, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 13 in src/Files.Core.SourceGenerator/Generators/StringsPropertyGenerator.cs

GitHub Actions / build (Debug, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)
internal sealed class StringsPropertyGenerator : IIncrementalGenerator
{
// Static HashSet to track generated file names
/// <summary>
/// Analyzer that detects if string literals can be replaced with constants from the <c>Strings</c> class.
/// </summary>
[DiagnosticAnalyzer(LanguageNames.CSharp)]

Check warning on line 12 in src/Files.Core.SourceGenerator/Analyzers/StringsPropertyAnalyzer.cs

GitHub Actions / build (Release, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/Files.Core.SourceGenerator/Analyzers/StringsPropertyAnalyzer.cs

GitHub Actions / build (Release, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/Files.Core.SourceGenerator/Analyzers/StringsPropertyAnalyzer.cs

GitHub Actions / build (Debug, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 12 in src/Files.Core.SourceGenerator/Analyzers/StringsPropertyAnalyzer.cs

GitHub Actions / build (Debug, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)
internal sealed class StringsPropertyAnalyzer : DiagnosticAnalyzer
{
/// <summary>
/// <summary>
/// A generator for serializing/deserializing objects to/from the Windows Registry using attributes.
/// </summary>
[Generator]

Check warning on line 9 in src/Files.Core.SourceGenerator/Generators/RegistrySerializationGenerator.cs

GitHub Actions / build (Release, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 9 in src/Files.Core.SourceGenerator/Generators/RegistrySerializationGenerator.cs

GitHub Actions / build (Release, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 9 in src/Files.Core.SourceGenerator/Generators/RegistrySerializationGenerator.cs

GitHub Actions / build (Debug, x64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)

Check warning on line 9 in src/Files.Core.SourceGenerator/Generators/RegistrySerializationGenerator.cs

GitHub Actions / build (Debug, arm64)

This compiler extension should not be implemented in an assembly containing a reference to Microsoft.CodeAnalysis.Workspaces. The Microsoft.CodeAnalysis.Workspaces assembly is not provided during command line compilation scenarios, so references to it could cause the compiler extension to behave unpredictably. (https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md)
internal sealed class RegistrySerializationGenerator : IIncrementalGenerator
{
/// <summary>
GetKeyState
CreateDirectoryFromApp
WNetCancelConnection2
NET_USE_CONNECT_FLAGS

Check warning on line 48 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, arm64)

Method, type or constant "NET_USE_CONNECT_FLAGS" not found

Check warning on line 48 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, x64)

Method, type or constant "NET_USE_CONNECT_FLAGS" not found

Check warning on line 48 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, x64)

Method, type or constant "NET_USE_CONNECT_FLAGS" not found

Check warning on line 48 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, arm64)

Method, type or constant "NET_USE_CONNECT_FLAGS" not found
NETRESOURCEW
WNetAddConnection3
CREDENTIALW
SetEntriesInAcl
ACL_SIZE_INFORMATION
DeleteAce
EXPLICIT_ACCESS

Check warning on line 81 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, arm64)

Method, type or constant "EXPLICIT_ACCESS" not found. Did you mean or "EXPLICIT_ACCESS_A" or "EXPLICIT_ACCESS_W"?

Check warning on line 81 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, x64)

Method, type or constant "EXPLICIT_ACCESS" not found. Did you mean or "EXPLICIT_ACCESS_A" or "EXPLICIT_ACCESS_W"?

Check warning on line 81 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, x64)

Method, type or constant "EXPLICIT_ACCESS" not found. Did you mean or "EXPLICIT_ACCESS_A" or "EXPLICIT_ACCESS_W"?

Check warning on line 81 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, arm64)

Method, type or constant "EXPLICIT_ACCESS" not found. Did you mean or "EXPLICIT_ACCESS_A" or "EXPLICIT_ACCESS_W"?
ACCESS_ALLOWED_ACE
LookupAccountSid
GetComputerName
CoTaskMemFree
QueryDosDevice
DeviceIoControl
GetLastError

Check warning on line 137 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, arm64)

This API will not be generated. Do not generate GetLastError. Call Marshal.GetLastWin32Error() instead. Learn more from https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error

Check warning on line 137 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Release, x64)

This API will not be generated. Do not generate GetLastError. Call Marshal.GetLastWin32Error() instead. Learn more from https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error

Check warning on line 137 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, x64)

This API will not be generated. Do not generate GetLastError. Call Marshal.GetLastWin32Error() instead. Learn more from https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error

Check warning on line 137 in src/Files.App.CsWin32/NativeMethods.txt

GitHub Actions / build (Debug, arm64)

This API will not be generated. Do not generate GetLastError. Call Marshal.GetLastWin32Error() instead. Learn more from https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error
CreateFile
GetVolumeInformation
COMPRESSION_FORMAT
private static void OnOneRowModeEnabledChanged(DependencyObject d, object newValue)
{
var self = d as AdaptiveGridView;
self.DetermineOneRowMode();

Check warning on line 65 in src/Files.App.Controls/AdaptiveGridView/AdaptiveGridView.Properties.cs

GitHub Actions / build (Release, x64)

Dereference of a possibly null reference.
}
private static void DesiredWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
/// <summary>
/// Initializes a new instance of the <see cref="BladeItem"/> class.
/// </summary>
public BladeItem()

Check warning on line 18 in src/Files.App.Controls/BladeView/BladeItem.cs

GitHub Actions / build (Debug, x64)

Non-nullable field '_parentBladeView' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 18 in src/Files.App.Controls/BladeView/BladeItem.cs

GitHub Actions / build (Debug, x64)

Non-nullable field '_closeButton' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 18 in src/Files.App.Controls/BladeView/BladeItem.cs

GitHub Actions / build (Debug, arm64)

Non-nullable field '_parentBladeView' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 18 in src/Files.App.Controls/BladeView/BladeItem.cs

GitHub Actions / build (Debug, arm64)

Non-nullable field '_closeButton' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
{
DefaultStyleKey = typeof(BladeItem);
}