### Information Dialog Example
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/en/getting-started.md
Displays an information dialog with custom button radius.
```csharp
// File deleted successfully, with rounded buttons
MessageBox.Show("File deleted successfully.", "Message", MessageBoxButton.OK, MessageBoxImage.Information, buttonRadius: 4);
```
--------------------------------
### Install WPFDevelopers via NuGet
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/Home
Use the Package Manager Console to add the WPFDevelopers library to your project.
```xml
Install-Package WPFDevelopers
```
--------------------------------
### WPFDevelopers Sample Project Directory Structure
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/en/getting-started.md
The project is organized into logical folders for views, viewmodels, models, and helper controls. Use this structure to locate specific control examples and their corresponding XAML/C# files.
```text
src/WPFDevelopers.Samples.Shared/
├── App.xaml # App entry point & theme config
├── ExampleViews/ # Full control example pages
│ ├── MainWindow.xaml # Main window (left menu + right content)
│ ├── UsageGuide.xaml # Usage guide page
│ ├── UsageColor.xaml # Color usage guide
│ ├── Basics/ # Basic control examples (23 individual pages)
│ │ ├── ThemeExample.xaml
│ │ ├── MenuExample.xaml
│ │ ├── WindowBasicExample.xaml
│ │ ├── LoadingBasicExample.xaml
│ │ ├── ButtonExample.xaml
│ │ ├── RadioButtonExample.xaml
│ │ ├── CheckboxExample.xaml
│ │ ├── TextBoxExample.xaml
│ │ ├── PasswordBoxExample.xaml
│ │ ├── ComboBoxExample.xaml
│ │ ├── ToggleButtonExample.xaml
│ │ ├── DatePickerExample.xaml
│ │ ├── DateTimePickerExample.xaml
│ │ ├── CalendarExample.xaml
│ │ ├── SliderExample.xaml
│ │ ├── ProgressBarExample.xaml
│ │ ├── DataGridExample.xaml
│ │ ├── ListBoxExample.xaml
│ │ ├── ListViewExample.xaml
│ │ ├── TreeViewExample.xaml
│ │ ├── ExpanderExample.xaml
│ │ ├── GroupBoxExample.xaml
│ │ └── TabControlExample.xaml
│ ├── Loading/ # Loading animation series
│ │ ├── BallLoadingExample.xaml
│ │ ├── RingLoadingExample.xaml
│ │ ├── StreamerLoadingExample.xaml
│ │ ├── WaitLoadingExample.xaml
│ │ ├── CycleLoadingExample.xaml
│ │ └── RollLoadingExample.xaml
│ ├── DrawerMenu/ # Drawer menu sub-pages
│ │ ├── HomePage.xaml
│ │ ├── EmailPage.xaml
│ │ └── EdgePage.xaml
│ ├── NavScrollPanel/ # Nav settings panel sub-pages
│ │ ├── About.xaml
│ │ ├── PrivacySettings.xaml
│ │ ├── PlaybackSettings.xaml
│ │ ├── ShortcutKeys.xaml
│ │ └── DesktopLyrics.xaml
│ ├── LoginWindow/ # Login window template
│ │ ├── CustomControl/
│ │ ├── CustomStyle/
│ │ └── LoginExample.xaml
│ ├── CropAvatar/ # Avatar cropping
│ │ ├── CropAvatarExample.xaml
│ │ └── CropAvatarWindow.xaml
│ ├── NumberCard/ # Countdown cards
│ │ ├── NumberCardExample.xaml
│ │ └── NumberCardControl.xaml
│ ├── SpeedRockets/ # Rocket animation
│ │ ├── SpeedRocketsExample.xaml
│ │ └── SpeedRocketsMini.xaml
│ ├── ZooSemy/ # Skeuomorphic knob
│ │ ├── ZooSemyExample.xaml
│ │ └── VolumeControl.xaml
│ ├── CanvasHandWriting/ # Handwriting
│ │ └── CanvasHandWritingExample.xaml
│ ├── Desktop/ # Desktop wallpaper
│ │ ├── DesktopBackground.xaml
│ │ └── DesktopPlayVideo.xaml
│ ├── Passwrod/ # Password controls
│ │ ├── PasswordExample.xaml
│ │ └── PasswordWithPlainText.xaml
│ ├── Map/ # Map
│ │ └── BingAMapExample.xaml
│ ├── DrapView/ # Drag view
│ │ └── DrapViewExample.xaml
│ └── ... (more example files)
├── Controls/ # Sample helper controls (CodeViewer, NavigateMenu, etc.)
├── ViewModels/ # Sample ViewModels
├── Models/ # Data models
├── Helpers/MenuEnum.cs # All example category enum
└── Converts/ # Value converters
```
--------------------------------
### Implement WPFDevelopers Control
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/zh/getting-started.md
Example of integrating a control within a Window using the defined namespace.
```xml
```
--------------------------------
### Warning Dialog Example
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/en/getting-started.md
Displays a warning dialog using default button settings.
```csharp
// Uses default OK button
MessageBox.Show("Performing this action may cause the file to become inaccessible!", "Warning", MessageBoxImage.Warning);
```
--------------------------------
### ProgressBar XAML Configuration
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/BasicControls
ProgressBar examples including striped styling and indeterminate mode.
```xml
```
--------------------------------
### Implement TextBoxes with Watermarks
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/BasicControls
Examples of using the ElementHelper to add watermarks to TextBox controls.
```xml
```
```xml
```
--------------------------------
### Error Dialog Example
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/en/getting-started.md
Displays a standard error dialog.
```csharp
MessageBox.Show("The file does not exist.", "Error", MessageBoxImage.Error);
```
--------------------------------
### Direct Control Usage Patterns
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/en/getting-started.md
Examples of various direct controls provided by the library, including animations, navigation, and data visualization components.
```xml
```
--------------------------------
### Display MessageBox variants
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/BasicControls
Examples of showing different types of message boxes with various icons and buttons.
```C#
MessageBox.Show("文件删除成功。", "消息", MessageBoxButton.OK, MessageBoxImage.Information);
MessageBox.Show("当前文件不存在!", "警告", MessageBoxImage.Warning);
MessageBox.Show("当前文件不存在。", "错误", MessageBoxImage.Error);
MessageBox.Show("当前文件不存在,是否继续?", "询问", MessageBoxButton.OKCancel, MessageBoxImage.Question);
```
--------------------------------
### Configure App.xaml Resources
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/Home
Register the theme and resource dictionary in App.xaml. Ensure wd:Resources is placed after the Theme.xaml dictionary.
```xml
```
--------------------------------
### 配置 App.xaml 主题资源
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/zh/getting-started.md
在 App.xaml 中引入命名空间并配置资源字典,确保 Theme.xaml 在 wd:Resources 之前加载。
```xml
```
--------------------------------
### 配置 App.xaml 资源
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/README-zh.md
在 App.xaml 中引入命名空间并配置 ResourceDictionary,确保 wd:Resources 位于 Theme.xaml 之后。
```xml
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
```
```xml
```
--------------------------------
### Implement Buttons with Styles
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/BasicControls
Demonstrates various button styles including default, success, warning, and danger variants with enabled and disabled states.
```xml
```
--------------------------------
### 确认对话框及返回值处理
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/zh/getting-started.md
通过 switch 语句处理用户在确认对话框中的选择。
```csharp
var result = MessageBox.Show("当前文件不存在,是否继续?", "询问", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
switch (result)
{
case MessageBoxResult.Yes:
// 用户点击"是"
break;
case MessageBoxResult.No:
// 用户点击"否"
break;
case MessageBoxResult.Cancel:
// 用户点击"取消"或关闭
break;
}
```
--------------------------------
### Implement TabControl with various placements
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/BasicControls
Demonstrates TabControl usage with different TabStripPlacement settings inside a UniformGrid.
```xml
```
--------------------------------
### Use Static Resource Styles
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/en/getting-started.md
Apply pre-defined styles to standard buttons to achieve consistent theming.
```xml
```
--------------------------------
### Implement GridSplitter for resizable columns
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/BasicControls
Shows how to use a GridSplitter to allow users to resize columns within a Grid.
```xml
```
--------------------------------
### Implement PasswordBoxes
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/BasicControls
Demonstrates PasswordBox with watermark support and monitoring enabled, including C# password assignment.
```xml
```
```xml
```
```csharp
myPasswordBox.Password = "WPFDevelopers.Minimal";
```
--------------------------------
### 安装 NuGet 包
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/zh/getting-started.md
使用包管理器控制台安装 WPFDevelopers 库,支持正式版与预览版。
```powershell
Install-Package WPFDevelopers
```
```powershell
Install-Package WPFDevelopers -Pre
```
--------------------------------
### Apply Static Resource Styles
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/zh/getting-started.md
Apply predefined library styles to standard controls using StaticResource.
```xml
```
--------------------------------
### Define a ContextMenu in XAML
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/wiki/BasicControls
Create a simple context menu with multiple menu items.
```xml
```
--------------------------------
### Implement Basic SplitButton with Data Binding
Source: https://github.com/wpfdevelopersorg/wpfdevelopers/blob/master/docs/en/getting-started.md
Use ItemsSource for dynamic menu population and handle the SelectionChanged event to respond to user input.
```xml
```
```csharp
// ViewModel or Code-behind
public ObservableCollection MenuItems { get; } = new ObservableCollection
{
"Save in PDF",
"Save in Word",
"Save in Excel",
"Save in Image"
};
private void SplitButton_SelectionChanged(object sender, RoutedPropertyChangedEventArgs