WPF-UI.Violeta 3.0.5.13

There is a newer version of this package available.
See the version list below for details.
dotnet add package WPF-UI.Violeta --version 3.0.5.13                
NuGet\Install-Package WPF-UI.Violeta -Version 3.0.5.13                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WPF-UI.Violeta" Version="3.0.5.13" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WPF-UI.Violeta --version 3.0.5.13                
#r "nuget: WPF-UI.Violeta, 3.0.5.13"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install WPF-UI.Violeta as a Cake Addin
#addin nuget:?package=WPF-UI.Violeta&version=3.0.5.13

// Install WPF-UI.Violeta as a Cake Tool
#tool nuget:?package=WPF-UI.Violeta&version=3.0.5.13                

WPF UI Banner Dark

WPF UI Banner Light

WPF UI Violeta

GitHub license NuGet VS 2022 Downloads Actions Platform

WPF UI Violeta is based on WPF UI, and provides the Fluent experience in your known and loved WPF framework. Some new immersive controls like Toast, Flyout, ContentDialog, MessageBox and etc.

Some idea or codes are ported from ModernWpf and Fischless.

When I decided to create this project I was listening to the song Violeta.

πŸš€ Getting started

Similar to WPF UI.

<Application
    xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
    xmlns:vio="http://schemas.lepo.co/wpfui/2022/xaml/violeta">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ui:ThemesDictionary Theme="Dark" />
                <ui:ControlsDictionary />
                <vio:ControlsDictionary />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

πŸ‘‹Examples

Wpf.Ui.Test

  • Toast

    Toast is an independent popup notification that automatically disappears after a specified time.

    Toast.Information("I am information message");
    Toast.Error("I am error message");
    Toast.Success("I am success message");
    Toast.Warning("I am warning message");
    Toast.Show(owner: null!, "I am any message",  new ToastConfig());
    
  • Flyout

    The FlyoutService enables you to attach Flyout menus or tooltips to various controls such as Button, providing a flexible and intuitive way to display additional content or options.

    <ui:Button Content="Show Flyout">
        <ui:FlyoutService.Flyout>
            <ui:Flyout Placement="Bottom">
                <StackPanel>
                    <TextBlock
                        HorizontalAlignment="Left"
                        Text="Show the flyout message here" />
                     <Button
                       Command="{Binding GotItCommand}"
                       Content="Got it" />
                </StackPanel>
            </ui:Flyout>
        </ui:FlyoutService.Flyout>
    </ui:Button>
    
  • ContentDialog

    The ContentDialogHostService simplifies the creation and management of ContentDialog instances in your application.

    ContentDialog dialog = new()
    {
        Title = "My sample dialog",
        Content = "Content of the dialog",
        CloseButtonText = "Close button",
        PrimaryButtonText = "Primary button",
        SecondaryButtonText = "Secondary button"
    };
    
    // Setting the dialog container
    dialog.DialogHost = ContentDialogHostService.ContentPresenterForDialogs;
    
    // Showing the dialog
    await dialog.ShowAsync(CancellationToken.None);
    
  • MessageBox

    To utilize Win32's classic MessageBox methods while supporting modern UI themes like Mica and dark mode.

    global using MessageBox = Wpf.Ui.Violeta.Controls.MessageBox;
    
    // Sync methods
    _ = MessageBox.Information("This is a information message");
    _ = MessageBox.Warning("This is a warning message");
    _ = MessageBox.Error("This is a error message");
    MessageBoxResult result =  MessageBox.Question("This is a question and do you want to click OK?");
    
    // Async methods
    _ = await MessageBox.InformationAsync("This is a information message");
    _ = await MessageBox.WarningAsync("This is a warning message");
    _ = await MessageBox.ErrorAsync("This is a error message");
    MessageBoxResult result = await MessageBox.QuestionAsync("This is a question and do you want to click OK?");
    
  • ToggleButtonGroup / RadioButtonGroup

    Turn the ToggleButton and RadioButton under the same Group into a radio button.

    <StackPanel Orientation="Horizontal">
        <StackPanel.Resources>
            <vio:ToggleButtonGroup x:Key="ToggleButtonGroup" />
        </StackPanel.Resources>
        <ToggleButton
            vio:ToggleButtonGroup.Group="{DynamicResource ToggleButtonGroup}"
            Content="1st"
            IsChecked="True" />
        <ToggleButton
            vio:ToggleButtonGroup.Group="{DynamicResource ToggleButtonGroup}"
            Content="2nd" />
    </StackPanel>
    
    <StackPanel Orientation="Horizontal">
        <StackPanel.Resources>
            <vio:RadioButtonGroup x:Key="RadioButtonGroup" />
        </StackPanel.Resources>
        <RadioButton
                     vio:RadioButtonGroup.Group="{DynamicResource RadioButtonGroup}"
                     Content="1st"
                     IsChecked="True" />
        <Grid>
            <RadioButton
                         Margin="8,0,0,0"
                         vio:RadioButtonGroup.Group="{DynamicResource RadioButtonGroup}"
                         Content="2nd" />
        </Grid>
    </StackPanel>
    
  • Splash

    Show the Splash Screen in another UI thread.

    public App()
    {
        Splash.ShowAsync("pack://application:,,,/Wpf.Ui.Test;component/wpfui.png");
        InitializeComponent();
    }
    
    public MainWindow()
    {
        InitializeComponent();
        Splash.CloseOnLoaded(this, minimumMilliseconds: 1800);
    }
    
  • TreeListView

    TreeListView is a better way to display hierarchical data.

    <ui:TreeListView Model="{Binding TreeTestModel}">
    <ui:GridView>
         <ui:GridView.Columns>
             <ui:GridViewColumn Width="400" Header="Column1">
                 <ui:GridViewColumn.CellTemplate>
                     <DataTemplate>
                         <ui:TreeRowExpander Content="{Binding Column1}" />
                     </DataTemplate>
                 </ui:GridViewColumn.CellTemplate>
             </ui:GridViewColumn>
             <ui:GridViewColumn
                 Width="250"
                 DisplayMemberBinding="{Binding Column2, Mode=TwoWay}"
                 Header="Column2" />
             <ui:GridViewColumn
                 Width="250"
                 DisplayMemberBinding="{Binding Column3, Mode=TwoWay}"
                 Header="Column3" />
             <ui:GridViewColumn Width="250" Header="IsChecked">
                 <ui:GridViewColumn.CellTemplate>
                     <DataTemplate>
                         <ui:ToggleSwitch IsChecked="{Binding IsChecked}" />
                     </DataTemplate>
                 </ui:GridViewColumn.CellTemplate>
             </ui:GridViewColumn>
         </ui:GridView.Columns>
    </ui:GridView>
    </ui:TreeListView>
    
    public partial class ViewModel : ObservableObject
    {
        [ObservableProperty]
        private TreeCollection<TreeTestModel> treeTestModel = CreateTestModel();
    
        public static TreeCollection<TreeTestModel> CreateTestModel()
        {
            return new TreeCollection<TreeTestModel>()
            {
                Children = new(
                [
                    new()
                    {
                        Column1 = "Test 1",
                        Column2 = "Test 1",
                        Column3 = "Test 1",
                        Children = new(
                        [
                            new()
                            {
                                Column1 = "Test 1.1",
                                Column2 = "Test 1.1",
                                Column3 = "Test 1.1",
                                Children = new(
                                [
                                    new()
                                    {
                                        Column1 = "Test 1.2",
                                        Column2 = "Test 1.2",
                                        Column3 = "Test 1.2",
                                    },
                                ]),
                            },
                        ]),
                    },
                    new()
                    {
                        Column1 = "Test 2",
                        Column2 = "Test 2",
                        Column3 = "Test 2",
                    }
                ]),
            };
        }
    }
    
    [ObservableObject]
    public partial class TreeTestModel : TreeObject<TreeTestModel>
    {
        [ObservableProperty]
        private string? column1;
    
        [ObservableProperty]
        private string? column2;
    
        [ObservableProperty]
        private string? column3;
    
        [ObservableProperty]
        private bool isChecked = false;
    }
    
  • ImageView

    Provides a scalable image control.

    <vio:ImageView Source="/wpfui.png" />
    
  • ExceptionReport

    Show a dialog to handle the DispatcherUnhandledException from Application.

    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
    
            DispatcherUnhandledException += (object s, DispatcherUnhandledExceptionEventArgs e) =>
            {
                e.Handled = true;
                ExceptionReport.Show(e.Exception);
            };
        }
    }
    

πŸ“· Screenshots

Under construction

Thanks

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0-windows was computed.  net8.0-windows7.0 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

  • .NETFramework 4.7

  • .NETFramework 4.7.1

  • .NETFramework 4.7.2

  • .NETFramework 4.8

  • .NETFramework 4.8.1

  • net6.0-windows7.0

  • net7.0-windows7.0

  • net8.0-windows7.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on WPF-UI.Violeta:

Repository Stars
babalae/better-genshin-impact
📦BetterGI · ζ›΄ε₯½ηš„εŽŸη₯ž - θ‡ͺεŠ¨ζ‹Ύε– | θ‡ͺεŠ¨ε‰§ζƒ… | ε…¨θ‡ͺεŠ¨ι’“ι±Ό(AI) | ε…¨θ‡ͺεŠ¨δΈƒεœ£ε¬ε”€ | θ‡ͺ动伐木 | θ‡ͺ动刷本 | θ‡ͺεŠ¨ι‡‡ι›† - UI Automation Testing Tools For Genshin Impact
Version Downloads Last updated
3.0.5.23 156 10/27/2024
3.0.5.22 86 10/27/2024
3.0.5.21 86 10/27/2024
3.0.5.20 138 10/16/2024
3.0.5.19 83 10/13/2024
3.0.5.18 212 10/9/2024
3.0.5.17 80 10/7/2024
3.0.5.16 178 9/30/2024
3.0.5.15 134 9/27/2024
3.0.5.14 113 9/23/2024
3.0.5.13 108 9/19/2024
3.0.5.12 385 9/10/2024
3.0.5.11 91 9/10/2024
3.0.5.10 136 9/10/2024
3.0.5.9 87 9/8/2024
3.0.5.8 79 9/8/2024
3.0.5.7 129 9/3/2024
3.0.5.6 116 8/26/2024
3.0.5.5 125 8/23/2024
3.0.5.4 129 8/22/2024
3.0.5.3 303 8/20/2024
3.0.5.2 185 8/15/2024
3.0.5.1 112 8/15/2024
3.0.5 113 8/13/2024