Skip to content

Commit a44a5e0

Browse files
Merge pull request #26 from augustoproiete/release/2.0
Release 2.0.0
2 parents 71dbc0d + dec9525 commit a44a5e0

25 files changed

+286
-403
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ _ReSharper*/
3434
#Ignore files created by NUnit
3535
TestResult.xml
3636
*.VisualState.xml
37+
/Ookii.Dialogs.Wpf.NETCore/Properties/PublishProfiles

Ookii.Dialogs.Wpf.sln

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.28803.452
4+
VisualStudioVersion = 16.0.30711.63
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{85E0D2C3-A700-4A65-BFEA-1F9A29875419}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs.Wpf.Sample", "sample\Ookii.Dialogs.Wpf.Sample\Ookii.Dialogs.Wpf.Sample.csproj", "{E38181B2-E8E5-466D-9099-33FE75B4CFA1}"
9-
EndProject
108
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E248E2C9-CE4A-41D2-91A0-8F61AAB69247}"
119
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ookii.Dialogs.Wpf", "src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj", "{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}"
13-
EndProject
1410
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{B2AB57E4-0121-4AF9-A559-C53B442F33D8}"
1511
ProjectSection(SolutionItems) = preProject
1612
.editorconfig = .editorconfig
1713
.gitattributes = .gitattributes
1814
.gitignore = .gitignore
15+
global.json = global.json
1916
LICENSE = LICENSE
17+
nuget.config = nuget.config
2018
assets\ookii-dialogs.snk = assets\ookii-dialogs.snk
2119
README.md = README.md
20+
SECURITY.md = SECURITY.md
2221
EndProjectSection
2322
EndProject
23+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ookii.Dialogs.Wpf.Sample", "sample\Ookii.Dialogs.Wpf.Sample\Ookii.Dialogs.Wpf.Sample.csproj", "{E38181B2-E8E5-466D-9099-33FE75B4CFA1}"
24+
EndProject
25+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ookii.Dialogs.Wpf", "src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj", "{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}"
26+
EndProject
2427
Global
2528
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2629
Debug|Any CPU = Debug|Any CPU

README.md

Lines changed: 65 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1-
# Ookii.Dialogs.Wpf [![NuGet Version](http://img.shields.io/nuget/v/Ookii.Dialogs.Wpf.svg?style=flat)](https://www.nuget.org/packages/Ookii.Dialogs.Wpf/)
1+
README.md |
2+
|:---|
23

3-
## Overview
4+
<div align="center">
45

5-
**Ookii.Dialogs.Wpf** is a class library for .NET applications providing several common dialogs. Included are classes for task dialogs, credential dialogs, progress dialogs, and common file dialogs.
6+
<img src="assets/ookii-dialogs-wpf-nuget.png" alt="Ookii.Dialogs.Wpf" width="100" />
7+
8+
</div>
9+
10+
<h1 align="center">Ookii.Dialogs.Wpf</h1>
11+
<div align="center">
12+
13+
A class library for WPF applications providing several common dialogs. Included are classes for task dialogs, credential dialogs, progress dialogs, and common file dialogs.
14+
15+
[![NuGet Version](http://img.shields.io/nuget/v/Ookii.Dialogs.Wpf.svg?style=flat)](https://www.nuget.org/packages/Ookii.Dialogs.Wpf) [![NuGet Downloads](https://img.shields.io/nuget/dt/Ookii.Dialogs.Wpf.svg)](https://www.nuget.org/packages/Ookii.Dialogs.Wpf) [![.NET Framework](https://img.shields.io/badge/.NET%20Framework-%3E%3D%204.5-informational)](https://dotnet.microsoft.com/download) [![.NET Core](https://img.shields.io/badge/.NET%20Core-%3E%3D%203.1.0-informational)](https://dotnet.microsoft.com/download)
16+
17+
</div>
618

719
## Give a Star! :star:
820

@@ -18,8 +30,6 @@ Install-Package Ookii.Dialogs.Wpf
1830

1931
The included sample application [`Ookii.Dialogs.Sample.Wpf`](sample/Ookii.Dialogs.Wpf.Sample/) demonstrate the dialogs for WPF. View the source of this application to see how to use the dialogs.
2032

21-
N.B.: **Ookii.Dialogs.Wpf** requires the [Microsoft .NET Framework 4.5](https://www.microsoft.com/en-us/download/details.aspx?id=30653) or higher.
22-
2333
### Windows Forms compatibility
2434

2535
If you're looking to use these common dialogs on a Windows Forms application, check out [Ookii.Dialogs.WinForms](https://github.com/augustoproiete/ookii-dialogs-winforms).
@@ -30,7 +40,9 @@ If you're looking to use these common dialogs on a Windows Forms application, ch
3040

3141
[Task dialogs](https://docs.microsoft.com/en-us/windows/desktop/Controls/task-dialogs-overview) are a new type of dialog first introduced in Windows Vista. They provide a superset of the message box functionality.
3242

33-
![A task dialog](assets/sample-task-dialog.png)
43+
![A task dialog as it appears on Windows 10](assets/sample-task-dialog-win10.png)
44+
45+
![A task dialog with command links as it appears on Windows 10](assets/sample-task-dialog-command-links-win10.png)
3446

3547
The `Ookii.Dialogs.Wpf.TaskDialog` class provide access to the task dialog functionality. The `TaskDialog` class inherits from `System.ComponentModel.Component` and offers full support for the Component designer of Visual Studio.
3648

@@ -40,21 +52,21 @@ The `TaskDialog` class requires Windows Vista or a later version of Windows. Win
4052

4153
Progress dialogs are a common dialog to show progress during operations that may take a long time. They are used extensively in the Windows shell, and an API has been available since Windows 2000.
4254

43-
![A progress dialog as it appears on Windows Vista and later](assets/sample-progress-dialog.png)
55+
![A progress dialog as it appears on Windows 10](assets/sample-progress-dialog-win10.png)
4456

4557
The `Ookii.Dialogs.Wpf.ProgressDialog` class provide a wrapper for the Windows progress dialog API. The `ProgressDialog` class inherits from `System.ComponentModel.Component` and offers full support for the Component designer of Visual Studio. The `ProgressDialog` class resembles the `System.ComponentModel.BackgroundWorker` class and can be used in much the same way as that class.
4658

4759
The progress dialog's behaviour of the `ShowDialog` function is slightly different than that of other .NET dialogs; It is recommended to use a non-modal dialog with the `Show` function.
4860

49-
The `ProgressDialog` class is supported on Windows XP and later versions of Windows. However, the progress dialog has a very different appearance on Windows Vista and later (the image above shows the Vista version), so it is recommended to test on both operating systems to see if it appears to your satisfaction.
61+
The `ProgressDialog` class is supported on Windows XP and later versions of Windows. However, the progress dialog has a very different appearance on Windows Vista and later (the image above shows the Windows 10 version), so it is recommended to test on the operating systems your application is supported to see if it appears to your satisfaction.
5062

5163
When using Windows 7 or later, the `ProgressDialog` class automatically provides progress notification in the application's task bar button.
5264

5365
### Credential dialog
5466

5567
The `Ookii.Dialogs.Wpf.CredentialDialog` class provide wrappers for the `CredUI` functionality first introduced in Windows XP. This class provides functionality for saving and retrieving generic credentials, as well as displaying the credential UI dialog. This class does not support all functionality of `CredUI`; only generic credentials are supported, thing such as domain credentials or alternative authentication providers (e.g. smart cards or biometric devices) are not supported.
5668

57-
![A credential dialog as it appears on Windows Vista and later](assets/sample-credential-dialog.png)
69+
![A credential dialog as it appears on Windows 10](assets/sample-credential-dialog-win10.png)
5870

5971
The `CredentialDialog` class inherits from `System.ComponentModel.Component` and offers full support for the Component designer of Visual Studio.
6072

@@ -64,16 +76,55 @@ On Windows XP, the `CredentialDialog` class will use the `CredUIPromptForCredent
6476

6577
Windows Vista introduced a new style of common file dialogs. As of .NET 3.5 SP1, the Windows Forms `OpenFileDialog` and `SaveFileDialog` class will automatically use the new style under most circumstances; however, some settings (such as setting `ShowReadOnly` to `true`) still cause it to revert to the old dialog. The `FolderBrowserDialog` still uses the old style. In WPF, the `Microsoft.Win32.OpenFileDialog` and `SaveFileDialog` classes still use the old style dialogs, and a folder browser dialog is not provided at all.
6678

67-
![The Vista-style folder browser dialog on Windows 7](assets/sample-folderbrowser-dialog.png)
79+
![The Vista-style folder browser dialog on Windows 10](assets/sample-folderbrowser-dialog-win10.png)
6880

6981
The `Ookii.Dialogs.Wpf.VistaOpenFileDialog`, `Ookii.Dialogs.Wpf.VistaSaveFileDialog` and `Ookii.Dialogs.Wpf.VistaFolderBrowserDialog` classes provide these dialogs for WPF (note that in the case of the `OpenFileDialog` and `SaveFileDialog` it is recommended to use the built-in .NET classes unless you hit one of the scenarios where those classes use the old dialogs).
7082

7183
The classes have been designed to resemble the original WPF classes to make it easy to switch. When the classes are used on Windows XP, they will automatically fall back to the old style dialog; this is also true for the `VistaFolderBrowserDialog`; that class provides a complete implementation of a folder browser dialog for WPF, old as well as new style.
7284

73-
---
85+
## .NET Core 3.1 pre-requisites
7486

75-
Copyright (c) Sven Groot 2009-2018
87+
Ookii Dialogs leverages the components and visual styles of the Windows Common Controls library (`comctl32.dll`), and WPF applications targeting .NET Core 3.1 must add an [application manifest](https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests) (`app.manifest`) to their projects with a reference to `Microsoft.Windows.Common-Controls`.
7688

77-
Copyright (c) C. Augusto Proiete 2018-2020
89+
Without the application manifest, you'll get an error with a message similar to the below:
90+
91+
```
92+
System.EntryPointNotFoundException: 'Unable to find an entry point named '...' in DLL 'comctl32.dll'.'
93+
```
94+
95+
In Visual Studio, you can right click on your project and go to Add -> New Item... and select `Application Manifest File (Windows Only)`. That will create a template that you can customize and delete the parts you don't want and/or uncomment the parts that you want. The only required part for Ookii Dialogs to work is the `dependentAssembly` entry with the `Microsoft.Windows.Common-Controls` dependency.
96+
97+
```xml
98+
<?xml version="1.0" encoding="utf-8"?>
99+
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
100+
<!-- (...) -->
101+
102+
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
103+
<dependency>
104+
<dependentAssembly>
105+
<assemblyIdentity
106+
type="win32"
107+
name="Microsoft.Windows.Common-Controls"
108+
version="6.0.0.0"
109+
processorArchitecture="*"
110+
publicKeyToken="6595b64144ccf1df"
111+
language="*"
112+
/>
113+
</dependentAssembly>
114+
</dependency>
115+
</assembly>
116+
```
117+
118+
For more information, visit the following links:
119+
120+
- [EntryPointNotFoundException when instantiating a TaskDialog](https://github.com/augustoproiete/ookii-dialogs-wpf/issues/23)
121+
- [WPF System.EntryPointNotFoundException: Unable to find an entry point named 'TaskDialogIndirect' in DLL 'comctl32.dll'](https://github.com/augustoproiete-repros/repro-wpf-net5-comctl32-entrypointnotfoundexception)
122+
- [Calls to comctl32.dll succeed in .NET 4.8, but fail in .NET 5 with System.EntryPointNotFoundException](https://github.com/dotnet/wpf/issues/3815)
123+
124+
## Release History
125+
126+
Click on the [Releases](https://github.com/augustoproiete/ookii-dialogs-wpf/releases) tab on GitHub.
127+
128+
---
78129

79-
See [LICENSE](LICENSE) for details
130+
_Copyright &copy; 2009-2020 Ookii Dialogs Contributors - Provided under the [BSD 3-Clause "New" or "Revised" License](LICENSE)._
5.74 KB
Loading

assets/sample-credential-dialog.png

-51 KB
Binary file not shown.
34.9 KB
Loading
-124 KB
Binary file not shown.

assets/sample-input-dialog.png

-38.7 KB
Binary file not shown.
12.7 KB
Loading

assets/sample-progress-dialog.png

-55.2 KB
Binary file not shown.
Loading

assets/sample-task-dialog-win10.png

17.3 KB
Loading

assets/sample-task-dialog.png

-43.3 KB
Binary file not shown.

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"allowPrerelease": false,
4+
"version": "3.1.100",
5+
"rollForward": "latestFeature"
6+
}
7+
}

nuget.config

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
6+
</packageSources>
7+
<disabledPackageSources>
8+
<clear />
9+
</disabledPackageSources>
10+
<fallbackPackageFolders>
11+
<clear />
12+
</fallbackPackageFolders>
13+
</configuration>

sample/Ookii.Dialogs.Wpf.Sample/App.xaml.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Configuration;
4-
using System.Windows;
1+
using System.Windows;
52

63
namespace Ookii.Dialogs.Wpf.Sample
74
{

sample/Ookii.Dialogs.Wpf.Sample/MainWindow.xaml.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
42
using System.Windows;
5-
using System.Windows.Controls;
6-
using System.Windows.Data;
7-
using System.Windows.Documents;
8-
using System.Windows.Input;
9-
using System.Windows.Media;
10-
using System.Windows.Media.Imaging;
11-
using System.Windows.Navigation;
12-
using System.Windows.Shapes;
133
using System.Threading;
144
using System.ComponentModel;
155

@@ -32,7 +22,7 @@ public MainWindow()
3222
{
3323
InitializeComponent();
3424

35-
_sampleProgressDialog.DoWork += new System.ComponentModel.DoWorkEventHandler(_sampleProgressDialog_DoWork);
25+
_sampleProgressDialog.DoWork += new DoWorkEventHandler(_sampleProgressDialog_DoWork);
3626
}
3727

3828

Lines changed: 23 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,31 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
2+
33
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>9.0.30729</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{E38181B2-E8E5-466D-9099-33FE75B4CFA1}</ProjectGuid>
4+
<TargetFrameworks>net45;netcoreapp3.1</TargetFrameworks>
95
<OutputType>WinExe</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
6+
<UseWPF>true</UseWPF>
7+
<UseWindowsForms>true</UseWindowsForms>
118
<RootNamespace>Ookii.Dialogs.Wpf.Sample</RootNamespace>
9+
1210
<AssemblyName>Ookii.Dialogs.Wpf.Sample</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14-
<FileAlignment>512</FileAlignment>
15-
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
16-
<WarningLevel>4</WarningLevel>
17-
<ApplicationManifest>app.manifest</ApplicationManifest>
1811
<ApplicationIcon>ookii.ico</ApplicationIcon>
19-
<TargetFrameworkProfile />
20-
</PropertyGroup>
21-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22-
<DebugSymbols>true</DebugSymbols>
23-
<DebugType>full</DebugType>
24-
<Optimize>false</Optimize>
25-
<OutputPath>bin\Debug\</OutputPath>
26-
<DefineConstants>DEBUG;TRACE</DefineConstants>
27-
<ErrorReport>prompt</ErrorReport>
28-
<WarningLevel>4</WarningLevel>
29-
<Prefer32Bit>false</Prefer32Bit>
30-
</PropertyGroup>
31-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
32-
<DebugType>pdbonly</DebugType>
33-
<Optimize>true</Optimize>
34-
<OutputPath>bin\Release\</OutputPath>
35-
<DefineConstants>TRACE</DefineConstants>
36-
<ErrorReport>prompt</ErrorReport>
37-
<WarningLevel>4</WarningLevel>
38-
<Prefer32Bit>false</Prefer32Bit>
39-
</PropertyGroup>
40-
<PropertyGroup>
41-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
42-
</PropertyGroup>
43-
<PropertyGroup>
12+
<NeutralLanguage>en</NeutralLanguage>
13+
<ApplicationManifest>app.manifest</ApplicationManifest>
14+
4415
<SignAssembly>true</SignAssembly>
16+
<AssemblyOriginatorKeyFile>../../assets/ookii-dialogs.snk</AssemblyOriginatorKeyFile>
17+
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
18+
19+
<NoWarn>$(NoWarn);NU5048</NoWarn>
20+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
21+
<TreatSpecificWarningsAsErrors />
4522
</PropertyGroup>
23+
4624
<PropertyGroup>
47-
<AssemblyOriginatorKeyFile>..\..\assets\ookii-dialogs.snk</AssemblyOriginatorKeyFile>
25+
<DisableImplicitFrameworkReferences Condition=" '$(TargetFramework)' == 'net45' ">true</DisableImplicitFrameworkReferences>
4826
</PropertyGroup>
49-
<ItemGroup>
27+
28+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
5029
<Reference Include="System" />
5130
<Reference Include="System.Core" />
5231
<Reference Include="System.Xaml" />
@@ -55,67 +34,9 @@
5534
<Reference Include="PresentationCore" />
5635
<Reference Include="PresentationFramework" />
5736
</ItemGroup>
37+
5838
<ItemGroup>
59-
<ApplicationDefinition Include="App.xaml">
60-
<Generator>MSBuild:Compile</Generator>
61-
<SubType>Designer</SubType>
62-
</ApplicationDefinition>
63-
<Page Include="MainWindow.xaml">
64-
<Generator>MSBuild:Compile</Generator>
65-
<SubType>Designer</SubType>
66-
</Page>
67-
<Compile Include="App.xaml.cs">
68-
<DependentUpon>App.xaml</DependentUpon>
69-
<SubType>Code</SubType>
70-
</Compile>
71-
<Compile Include="MainWindow.xaml.cs">
72-
<DependentUpon>MainWindow.xaml</DependentUpon>
73-
<SubType>Code</SubType>
74-
</Compile>
75-
</ItemGroup>
76-
<ItemGroup>
77-
<Compile Include="Properties\AssemblyInfo.cs">
78-
<SubType>Code</SubType>
79-
</Compile>
80-
<Compile Include="Properties\Resources.Designer.cs">
81-
<AutoGen>True</AutoGen>
82-
<DesignTime>True</DesignTime>
83-
<DependentUpon>Resources.resx</DependentUpon>
84-
</Compile>
85-
<Compile Include="Properties\Settings.Designer.cs">
86-
<AutoGen>True</AutoGen>
87-
<DependentUpon>Settings.settings</DependentUpon>
88-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
89-
</Compile>
90-
<EmbeddedResource Include="Properties\Resources.resx">
91-
<Generator>ResXFileCodeGenerator</Generator>
92-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
93-
</EmbeddedResource>
94-
<None Include="App.config">
95-
<SubType>Designer</SubType>
96-
</None>
97-
<None Include="app.manifest" />
98-
<None Include="Properties\Settings.settings">
99-
<Generator>SettingsSingleFileGenerator</Generator>
100-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
101-
</None>
102-
<AppDesigner Include="Properties\" />
103-
</ItemGroup>
104-
<ItemGroup>
105-
<ProjectReference Include="..\..\src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj">
106-
<Project>{D01B1D20-8F5B-4834-8E5C-C7EC6DD587D4}</Project>
107-
<Name>Ookii.Dialogs.Wpf</Name>
108-
</ProjectReference>
109-
</ItemGroup>
110-
<ItemGroup>
111-
<Content Include="ookii.ico" />
39+
<ProjectReference Include="..\..\src\Ookii.Dialogs.Wpf\Ookii.Dialogs.Wpf.csproj" />
11240
</ItemGroup>
113-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
114-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
115-
Other similar extension points exist, see Microsoft.Common.targets.
116-
<Target Name="BeforeBuild">
117-
</Target>
118-
<Target Name="AfterBuild">
119-
</Target>
120-
-->
121-
</Project>
41+
42+
</Project>

0 commit comments

Comments
 (0)