rrebuffo.BaseUISupport
1.0.6
dotnet add package rrebuffo.BaseUISupport --version 1.0.6
NuGet\Install-Package rrebuffo.BaseUISupport -Version 1.0.6
<PackageReference Include="rrebuffo.BaseUISupport" Version="1.0.6" />
<PackageVersion Include="rrebuffo.BaseUISupport" Version="1.0.6" />
<PackageReference Include="rrebuffo.BaseUISupport" />
paket add rrebuffo.BaseUISupport --version 1.0.6
#r "nuget: rrebuffo.BaseUISupport, 1.0.6"
#:package rrebuffo.BaseUISupport@1.0.6
#addin nuget:?package=rrebuffo.BaseUISupport&version=1.0.6
#tool nuget:?package=rrebuffo.BaseUISupport&version=1.0.6
rrebuffo.BaseUISupport
UI framework for WPF desktop apps with a special focus on CasparCG clients.
It is the result of many years of work and iteration, and it is pretty much a work in prorgess.
Main features
- Unified UI and color scheme with light and dark modes.
- Compact windows and dialogs with custom areas for status items, menus and controls.
- Standarized buttons, toggles, labels, progress indicators and other controls.
- Rich tab controls and tabbed panels with support for closing tabs, pinned tabs and buttons.
- Custom behaviors for lists and other control boxes, supporting drag and drop, focus and other behaviors.
- Counters support.
- JSON settings library for apps.
- App initialization (checks for single instance and arguments) and splash windows.
- Multiple value converters compatible with binding and multibinding.
Installation
Create a new C# WPF Application project in Visual Studio 2022 targeting .NET 8 Desktop
Add the nuget package 'rrebuffo.BaseUISupport'
Open App.xaml and append the following resources inside the
<Application.Resources/>tag:<ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary x:Name="Colors" Source="pack://application:,,,/BaseUISupport;component/Styles/DarkColors.xaml"/> <ResourceDictionary Source="pack://application:,,,/BaseUISupport;component/Styles/ControlTemplates.xaml"/> <ResourceDictionary Source="pack://application:,,,/BaseUISupport;component/Styles/Icons.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>Open App.xaml.cs and add the constructor:
(This will change the text selection to solid colors instead of the semi-transparent selection that WPF defaults to)public App() : base() { AppContext.SetSwitch("Switch.System.Windows.Controls.Text.UseAdornerForTextboxSelectionRendering", false); }If the goal is to have a single instance of the application, add override the
OnStartupmethod:protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); _ = AppInitHelper.SingleInstanceCheck("UNIQUE_NAME_FOR_THIS_APP"); }Then add the following event handler to the window that should be activated when launching another instance:
using BaseUISupport.Helpers; public MainWindow() { InitializeComponent(); AppInitHelper.RequestActivate += ActivateSingleInstance; } private void ActivateSingleInstance(object? sender, EventArgs e) { Application.Current.Dispatcher.BeginInvoke(() => { WindowState = WindowState.Normal; Topmost = true; Activate(); Topmost = false; }); }Convert windows to AppWindow or DialogWindow:
- Add namespace to both XAML and C# files:
xmlns:ui="clr-namespace:BaseUISupport.Controls;assembly=BaseUISupport"
using BaseUISupport.Controls - Change base class to
ui:AppWindoworui:DialogWindowin XAML and extendAppWindoworDialogWindowin C# files.
- Add namespace to both XAML and C# files:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows7.0
- rrebuffo.FontUISupport (>= 1.0.0)
- System.Drawing.Common (>= 8.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.