Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ namespace MaterialDesignExtensions.Converters
/// </summary>
public class FileSystemInfoIconConverter : IValueConverter
{
private ISet<string> m_imageFileExtensions;
private IDictionary<string, object> m_contentForFileExtension;
private readonly ISet<string> m_imageFileExtensions;
private readonly IDictionary<string, object> m_contentForFileExtension;

/// <summary>
/// The content mode to control the type of icons or thumbnails for image file types.
Expand Down Expand Up @@ -131,7 +131,6 @@ public FileSystemInfoIconConverter()
["wmv"] = PackIconKind.FileVideo,
["flv"] = PackIconKind.FileVideo,
["avi"] = PackIconKind.FileVideo,
["flv"] = PackIconKind.FileVideo,
["mov"] = PackIconKind.FileVideo,
["webm"] = PackIconKind.FileVideo,
["mkv"] = PackIconKind.FileVideo,
Expand All @@ -150,7 +149,7 @@ public FileSystemInfoIconConverter()
["pptx"] = PackIconKind.FilePowerpoint,
["ppt"] = PackIconKind.FilePowerpoint,
["pps"] = PackIconKind.FilePowerpoint,
["pdf"] = PackIconKind.FilePdf,
["pdf"] = PackIconKind.FilePdfBox,
["txt"] = PackIconKind.FileDocument,
["rtf"] = PackIconKind.FileDocument
};
Expand All @@ -163,7 +162,7 @@ public FileSystemInfoIconConverter()

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is DirectoryInfo directory)
if (value is DirectoryInfo _)
{
return PackIconKind.Folder;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace MaterialDesignExtensions.Converters
/// </summary>
public class FileSystemInfoPackIconColorConverter : IValueConverter
{
private IDictionary<PackIconKind, Brush> m_brushesForPackIcon;
private readonly IDictionary<PackIconKind, Brush> m_brushesForPackIcon;

/// <summary>
/// Creates a new <see cref="FileSystemInfoPackIconColorConverter" />.
Expand All @@ -34,7 +34,7 @@ public FileSystemInfoPackIconColorConverter()
[PackIconKind.FileWord] = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#2196F3")),
[PackIconKind.FileExcel] = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#186C3F")),
[PackIconKind.FilePowerpoint] = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF9800")),
[PackIconKind.FilePdf] = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F44336"))
[PackIconKind.FilePdfBox] = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#F44336"))
};
}

Expand Down
8 changes: 4 additions & 4 deletions MaterialDesignExtensions/MaterialDesignExtensions.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net452;netcoreapp3.1;net5.0-windows;net6.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<AssemblyTitle>Material Design Extensions</AssemblyTitle>
<Summary>Material Design Extensions is based on Material Design in XAML Toolkit to provide additional controls and features for WPF apps. The controls might not be specified in the Material Design specification or would crash the scope of Material Design in XAML Toolkit.</Summary>
Expand Down Expand Up @@ -33,8 +33,8 @@ Important notice: The configuration for version 2.6.0 changed. See the release n
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MaterialDesignColors" Version="2.0.1" />
<PackageReference Include="MaterialDesignThemes" Version="4.1.0" />
<PackageReference Include="MaterialDesignColors" Version="2.0.4" />
<PackageReference Include="MaterialDesignThemes" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<!--<TargetFramework>net472</TargetFramework>-->
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
Expand All @@ -14,8 +14,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MaterialDesignColors" Version="2.0.1" />
<PackageReference Include="MaterialDesignThemes" Version="4.1.0" />
<PackageReference Include="MaterialDesignColors" Version="2.0.4" />
<PackageReference Include="MaterialDesignThemes" Version="4.3.0" />
</ItemGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
Expand Down