Skip to content

Commit 96c033f

Browse files
Add initial README
1 parent f1898f1 commit 96c033f

7 files changed

+76
-0
lines changed

Ookii.Dialogs.Wpf.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{B2AB57
1717
.gitattributes = .gitattributes
1818
.gitignore = .gitignore
1919
LICENSE = LICENSE
20+
README.md = README.md
2021
EndProjectSection
2122
EndProject
2223
Global

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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/)
2+
3+
## Overview
4+
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+
7+
### Getting started
8+
9+
Install the [Ookii.Dialogs.Wpf](https://www.nuget.org/packages/Ookii.Dialogs.Wpf/) package from NuGet:
10+
11+
```powershell
12+
Install-Package Ookii.Dialogs.Wpf
13+
```
14+
15+
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.
16+
17+
N.B.: **Ookii.Dialogs.Wpf** requires the [Microsoft .NET Framework 4.5](https://www.microsoft.com/en-us/download/details.aspx?id=30653). The included source code is intended for use in Visual Studio.
18+
19+
### Windows Forms compatibility
20+
21+
If you're looking to use these common dialogs on a Windows Forms application, check out [Ookii.Dialogs.WinForms](https://github.com/caioproiete/ookii-dialogs-winforms).
22+
23+
## Included dialogs
24+
25+
### Task dialog
26+
27+
[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.
28+
29+
![A task dialog](assets/sample-task-dialog.png)
30+
31+
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.
32+
33+
The `TaskDialog` class requires Windows Vista or a later version of Windows. Windows XP is not supported. Note that it is safe to instantiate the `TaskDialog` class and set any of its properties; only when the dialog is shown will a `NotSupportedException` be thrown on unsupported operating systems.
34+
35+
### Progress dialog
36+
37+
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.
38+
39+
![A progress dialog as it appears on Windows Vista and later](assets/sample-progress-dialog.png)
40+
41+
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.
42+
43+
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.
44+
45+
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.
46+
47+
When using Windows 7, the `ProgressDialog` class automatically provides progress notification in the application's task bar button.
48+
49+
### Credential dialog
50+
51+
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.
52+
53+
![A credential dialog as it appears on Windows Vista and later](assets/sample-credential-dialog.png)
54+
55+
The `CredentialDialog` class inherits from `System.ComponentModel.Component` and offers full support for the Component designer of Visual Studio.
56+
57+
On Windows XP, the `CredentialDialog` class will use the `CredUIPromptForCredentials` function to show the dialog; on Windows Vista and later, the `CredUIPromptForWindowsCredentials` function is used instead to show the new dialog introduced with Windows Vista. Because of the difference in appearance in the two versions (the image above shows the Vista version), it is recommended to test on both operating systems to see if it appears to your satisfaction.
58+
59+
### Vista-style common file dialogs
60+
61+
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.
62+
63+
![The Vista-style folder browser dialog on Windows 7](assets/sample-folderbrowser-dialog.png)
64+
65+
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).
66+
67+
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.
68+
69+
---
70+
71+
Copyright (c) Sven Groot 2009
72+
73+
Copyright (c) Caio Proiete 2018
74+
75+
See [LICENSE](LICENSE) for details

assets/sample-credential-dialog.png

51 KB
Loading
124 KB
Loading

assets/sample-input-dialog.png

38.7 KB
Loading

assets/sample-progress-dialog.png

55.2 KB
Loading

assets/sample-task-dialog.png

43.3 KB
Loading

0 commit comments

Comments
 (0)