![]() |
VOOZH | about |
dotnet add package I-Synergy.Framework.UI.WPF --version 2026.10618.11733
NuGet\Install-Package I-Synergy.Framework.UI.WPF -Version 2026.10618.11733
<PackageReference Include="I-Synergy.Framework.UI.WPF" Version="2026.10618.11733" />
<PackageVersion Include="I-Synergy.Framework.UI.WPF" Version="2026.10618.11733" />Directory.Packages.props
<PackageReference Include="I-Synergy.Framework.UI.WPF" />Project file
paket add I-Synergy.Framework.UI.WPF --version 2026.10618.11733
#r "nuget: I-Synergy.Framework.UI.WPF, 2026.10618.11733"
#:package I-Synergy.Framework.UI.WPF@2026.10618.11733
#addin nuget:?package=I-Synergy.Framework.UI.WPF&version=2026.10618.11733Install as a Cake Addin
#tool nuget:?package=I-Synergy.Framework.UI.WPF&version=2026.10618.11733Install as a Cake Tool
Windows Presentation Foundation (WPF) UI framework for building modern desktop applications on Windows. This package provides a complete WPF implementation of the I-Synergy Framework UI services, controls, and patterns with support for Windows 7, 8, and 10+.
👁 NuGet
👁 License
👁 .NET
👁 Platform
Install the package via NuGet:
dotnet add package I-Synergy.Framework.UI.WPF
Setup your WPF application with I-Synergy Framework:
using ISynergy.Framework.UI;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
public partial class App : Application
{
private IHost _host;
protected override async void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
_host = Host.CreateDefaultBuilder()
.ConfigureServices((context, services) =>
{
// Core services
services.AddSingleton<ILanguageService, LanguageService>();
services.AddSingleton<IMessengerService, MessengerService>();
services.AddSingleton<IBusyService, BusyService>();
// WPF services
services.AddSingleton<IDialogService, DialogService>();
services.AddSingleton<INavigationService, NavigationService>();
services.AddSingleton<IThemeService, ThemeService>();
services.AddSingleton<IFileService<FileResult>, FileService>();
services.AddSingleton<IClipboardService, ClipboardService>();
services.AddSingleton<IUpdateService, UpdateService>();
// ViewModels
services.AddTransient<MainViewModel>();
services.AddTransient<ShellViewModel>();
})
.Build();
await _host.StartAsync();
// Apply theme
var themeService = _host.Services.GetRequiredService<IThemeService>();
themeService.ApplyTheme();
// Show main window
var mainWindow = _host.Services.GetRequiredService<MainWindow>();
mainWindow.Show();
}
protected override async void OnExit(ExitEventArgs e)
{
await _host.StopAsync();
_host.Dispose();
base.OnExit(e);
}
}
<Window x:Class="MyApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:MyApp.ViewModels"
d:DataContext="{d:DesignInstance Type=vm:MainViewModel}"
Title="{Binding Title}"
Height="600" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Menu Grid.Row="0">
<MenuItem Header="File">
<MenuItem Header="New" Command="{Binding NewCommand}"/>
<MenuItem Header="Open" Command="{Binding OpenCommand}"/>
<MenuItem Header="Save" Command="{Binding SaveCommand}"/>
<Separator/>
<MenuItem Header="Exit" Command="{Binding ExitCommand}"/>
</MenuItem>
<MenuItem Header="Edit">
<MenuItem Header="Settings" Command="{Binding SettingsCommand}"/>
</MenuItem>
</Menu>
<Frame Grid.Row="1"
x:Name="MainFrame"
NavigationUIVisibility="Hidden"/>
<StatusBar Grid.Row="2">
<StatusBarItem>
<TextBlock Text="{Binding StatusMessage}"/>
</StatusBarItem>
<StatusBarItem HorizontalAlignment="Right">
<ProgressBar Width="100"
Height="16"
IsIndeterminate="{Binding BusyService.IsBusy}"/>
</StatusBarItem>
</StatusBar>
</Grid>
</Window>
using ISynergy.Framework.Mvvm.ViewModels;
public partial class MainWindow : Window
{
public MainWindow(MainViewModel viewModel)
{
InitializeComponent();
DataContext = viewModel;
}
}
using ISynergy.Framework.Mvvm.ViewModels;
using ISynergy.Framework.Mvvm.Commands;
public class ProductViewModel : ViewModel
{
private readonly IProductService _productService;
public AsyncRelayCommand SaveCommand { get; }
public AsyncRelayCommand DeleteCommand { get; }
public ProductViewModel(
ICommonServices commonServices,
IProductService productService,
ILogger<ProductViewModel> logger)
: base(commonServices, logger)
{
_productService = productService;
SaveCommand = new AsyncRelayCommand(SaveAsync, CanSave);
DeleteCommand = new AsyncRelayCommand(DeleteAsync);
}
private bool CanSave() => !string.IsNullOrEmpty(Name) && IsValid;
private async Task SaveAsync()
{
try
{
CommonServices.BusyService.StartBusy("Saving product...");
await _productService.SaveAsync(Product);
await CommonServices.DialogService.ShowInformationAsync(
"Product saved successfully",
"Success");
}
catch (Exception ex)
{
await CommonServices.DialogService.ShowErrorAsync(ex, "Error");
}
finally
{
CommonServices.BusyService.StopBusy();
}
}
private async Task DeleteAsync()
{
var result = await CommonServices.DialogService.ShowMessageAsync(
"Are you sure you want to delete this product?",
"Confirm Delete",
MessageBoxButtons.YesNo);
if (result == MessageBoxResult.Yes)
{
try
{
await _productService.DeleteAsync(Product.Id);
await CommonServices.NavigationService.GoBackAsync();
}
catch (Exception ex)
{
await CommonServices.DialogService.ShowErrorAsync(ex, "Error");
}
}
}
// Show custom dialog
private async Task EditSettingsAsync()
{
await CommonServices.DialogService
.ShowDialogAsync<SettingsWindow, SettingsViewModel, Settings>();
}
}
public class ShellViewModel : ViewModel
{
private readonly INavigationService _navigationService;
public AsyncRelayCommand<Type> NavigateCommand { get; }
public ShellViewModel(
ICommonServices commonServices,
INavigationService navigationService,
ILogger<ShellViewModel> logger)
: base(commonServices, logger)
{
_navigationService = navigationService;
NavigateCommand = new AsyncRelayCommand<Type>(NavigateAsync);
}
private async Task NavigateAsync(Type viewModelType)
{
await _navigationService.NavigateAsync(viewModelType);
}
// Navigate with parameters
private async Task NavigateToProductDetailAsync(Product product)
{
await _navigationService.NavigateAsync<ProductDetailViewModel>(product);
}
// Navigate back
private async Task GoBackAsync()
{
if (_navigationService.CanGoBack)
{
await _navigationService.GoBackAsync();
}
}
}
using ISynergy.Framework.Mvvm.Abstractions.Services;
using ISynergy.Framework.Core.Models.Results;
public class DocumentViewModel : ViewModel
{
private readonly IFileService<FileResult> _fileService;
public AsyncRelayCommand OpenFileCommand { get; }
public AsyncRelayCommand SaveFileCommand { get; }
public DocumentViewModel(
ICommonServices commonServices,
IFileService<FileResult> fileService,
ILogger<DocumentViewModel> logger)
: base(commonServices, logger)
{
_fileService = fileService;
OpenFileCommand = new AsyncRelayCommand(OpenFileAsync);
SaveFileCommand = new AsyncRelayCommand(SaveFileAsync);
}
private async Task OpenFileAsync()
{
var file = await _fileService.BrowseFileAsync(
new[] { ".pdf", ".docx", ".txt" });
if (file is not null)
{
// Read file content
using var stream = await file.OpenReadAsync();
// Process file...
}
}
private async Task SaveFileAsync()
{
var file = await _fileService.SaveFileAsync(
"document.pdf",
"Documents",
new[] { ".pdf" });
if (file is not null)
{
// Write file content
using var stream = await file.OpenWriteAsync();
// Save content...
}
}
}
using ISynergy.Framework.Mvvm.Abstractions.Services;
public class UpdateViewModel : ViewModel
{
private readonly IUpdateService _updateService;
public AsyncRelayCommand CheckForUpdatesCommand { get; }
public AsyncRelayCommand InstallUpdateCommand { get; }
public bool UpdateAvailable
{
get => GetValue<bool>();
set => SetValue(value);
}
public string UpdateVersion
{
get => GetValue<string>();
set => SetValue(value);
}
public UpdateViewModel(
ICommonServices commonServices,
IUpdateService updateService,
ILogger<UpdateViewModel> logger)
: base(commonServices, logger)
{
_updateService = updateService;
CheckForUpdatesCommand = new AsyncRelayCommand(CheckForUpdatesAsync);
InstallUpdateCommand = new AsyncRelayCommand(InstallUpdateAsync);
}
private async Task CheckForUpdatesAsync()
{
try
{
var update = await _updateService.CheckForUpdateAsync();
if (update.IsAvailable)
{
UpdateAvailable = true;
UpdateVersion = update.Version;
var result = await CommonServices.DialogService.ShowMessageAsync(
$"A new version ({update.Version}) is available. Would you like to install it?",
"Update Available",
MessageBoxButtons.YesNo);
if (result == MessageBoxResult.Yes)
{
await InstallUpdateAsync();
}
}
else
{
await CommonServices.DialogService.ShowInformationAsync(
"You are running the latest version.",
"No Updates");
}
}
catch (Exception ex)
{
await CommonServices.DialogService.ShowErrorAsync(ex, "Error");
}
}
private async Task InstallUpdateAsync()
{
try
{
CommonServices.BusyService.StartBusy("Downloading update...");
await _updateService.DownloadAndInstallUpdateAsync(
progress => CommonServices.BusyService.UpdateMessage($"Downloading... {progress}%"));
await CommonServices.DialogService.ShowInformationAsync(
"Update installed successfully. The application will now restart.",
"Update Complete");
_updateService.RestartApplication();
}
catch (Exception ex)
{
await CommonServices.DialogService.ShowErrorAsync(ex, "Error");
}
finally
{
CommonServices.BusyService.StopBusy();
}
}
}
<controls:BladeView ItemsSource="{Binding Blades}"
SelectedItem="{Binding SelectedBlade}" />
<controls:ImageBrowser Images="{Binding ProductImages}"
SelectedImage="{Binding SelectedImage}"
AllowAdd="True"
AllowRemove="True" />
<controls:Console Messages="{Binding ConsoleMessages}"
AutoScroll="True" />
<controls:ErrorPresenter Errors="{Binding ValidationErrors}"
Visibility="{Binding HasErrors, Converter={StaticResource BoolToVisibilityConverter}}" />
<controls:Tile Title="Dashboard"
Command="{Binding NavigateToDashboardCommand}"
Icon="{StaticResource DashboardIcon}" />
The WPF framework includes 40+ built-in theme palettes:
using ISynergy.Framework.Mvvm.Abstractions.Services;
// Theme is automatically applied on startup
// To change theme programmatically:
public void ChangeTheme(string colorHex, Themes theme)
{
// Update settings
_settingsService.LocalSettings.Color = colorHex;
_settingsService.LocalSettings.Theme = theme;
// Apply theme
_themeService.ApplyTheme();
// Restart application to fully apply theme
System.Windows.Forms.Application.Restart();
System.Windows.Application.Current.Shutdown();
}
// Show theme selection to users
private async Task ShowThemeSelectionAsync()
{
await CommonServices.DialogService
.ShowDialogAsync<ThemeWindow, ThemeViewModel, ThemeStyle>();
}
Using Microsoft.Xaml.Behaviors.Wpf:
<Window xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
<i:Interaction.Behaviors>
<behaviors:WindowDragBehavior />
</i:Interaction.Behaviors>
<TextBox>
<i:Interaction.Behaviors>
<behaviors:SelectAllOnFocusBehavior />
</i:Interaction.Behaviors>
</TextBox>
</Window>
Use Frame for navigation between pages and Window for dialogs and child windows.
Always configure theme on application startup for consistent UI appearance.
WPF supports Windows 7, 8, and 10+ through different target frameworks.
For issues, questions, or contributions, please visit the GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 net10.0-windows7.0 is compatible. net10.0-windows8.0 net10.0-windows8.0 is compatible. net10.0-windows10.0.26100 net10.0-windows10.0.26100 is compatible. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.10618.11733 | 0 | 6/18/2026 |
| 2026.10618.11702-preview | 0 | 6/18/2026 |
| 2026.10616.12121 | 85 | 6/16/2026 |
| 2026.10616.11904-preview | 84 | 6/16/2026 |
| 2026.10616.10010 | 90 | 6/15/2026 |
| 2026.10615.12240-preview | 87 | 6/15/2026 |
| 2026.10615.10047-preview | 85 | 6/14/2026 |
| 2026.10614.10112-preview | 84 | 6/13/2026 |
| 2026.10612.12341-preview | 89 | 6/12/2026 |
| 2026.10612.12110-preview | 82 | 6/12/2026 |
| 2026.10612.11941-preview | 87 | 6/12/2026 |
| 2026.10610.10831 | 98 | 6/10/2026 |
| 2026.10610.10706-preview-pr... | 90 | 6/10/2026 |
| 2026.10609.11323-preview | 86 | 6/9/2026 |
| 2026.10607.11905-preview | 88 | 6/7/2026 |
| 2026.10607.11454-preview | 82 | 6/7/2026 |
| 2026.10606.11854-preview | 87 | 6/6/2026 |
| 2026.10603.11238-preview | 91 | 6/3/2026 |
| 2026.10602.12203-preview | 94 | 6/2/2026 |
| 2026.10602.11949-preview | 88 | 6/2/2026 |