Skip to content

NinetailLabs/VaraniumSharp.WinUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VaraniumSharp.WinUI

Logo

Build status NuGet Coverage Status Bugs Code Smells Lines of Code Quality Gate Status

VaraniumSharp.WinUI is a VarniumSharp library with WinUI 3 helper classes and components. It can be used to implement certain features into a WinUI 3 project with minimal effort.

Functionality

  • Create a Window where the user can fully customize the layout and controls per tab
  • Automatic saving/loading of layouts the user configured previously
  • Multiple layout panes to assist with layout customization
  • Setting pane that can be extended easily with custom seting panes
  • Modules to assist with filtering, sorting and grouping a GridView with minimal setup
  • Drag and drop helper classes to easy the use of drag and drop functionality
  • Dialog wrappers to ease the use of WinUI dialogs
  • Bind converters
  • Sortable, filterable and groupable collections to back the sorting, filtering and grouping modules

Requirements

VaraniumSharp.WinUI relies on the attribute based dependency injection system provided by VaraniumSharp to handle the loading of it's components and to handle the customized layouts. As such a dependency injection package is required. Currently there are dependency injection packages for DryIoC and the Microsoft ServiceCollection It is easy to create a custom wrapper for your preferred package as well, simply look at the implementation of one of the above packages as a basic guide.

Basic setup

Simply create a new WinUI 3 project, add the VaraniumSharp.WinUI package and one of the above mentioned IoC packages then add the following code to your App.xaml.cs file's OnLaunched method to bootstrap the main window.

// It is required to pre-load the assemblies that are auto-injected by VaraniumSharp otherwise their injections won't be picked up
AppDomain.CurrentDomain.Load(new AssemblyName("VaraniumSharp.WinUI"));

// Set up your IoC container and request that all classes are registered
var containerSetup = new ContainerSetup();
containerSetup.RetrieveClassesRequiringRegistration(true);
containerSetup.RetrieveConcretionClassesRequiringRegistration(true);

// Resolve a TabWindow instance from the container, configure it and then activate it to display it to the user
var tabWindow = containerSetup.Resolve<TabWindow>();
tabWindow.MinWidth = 750;
tabWindow.Backdrop = new AcrylicSystemBackdrop();
m_window = tabWindow;
m_window.Activate();

Additional examples

VaraniumSharp.WinUI is designed to be easy to use, but some of the configurations are a bit counter-intuitive. To see how to handle the basic configuration a test project is included in the GitHub repository. See the test project here

Bugs, feedback, questions

Feel free to open an issue on GitHub to request further assistance.

Icon

Sprout by parkjisun from the Noun Project