Giter Site home page Giter Site logo

pinkuburu / wpfui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lepoco/wpfui

0.0 1.0 0.0 13.84 MB

A simple way to make your application written in WPF keep up with modern design trends. Library changes the base elements like Page, ToggleButton or List, and also includes additional controls like Navigation, NumberBox, Dialog or Snackbar.

Home Page: https://dev.lepo.co/

License: MIT License

C# 100.00%

wpfui's Introduction

WPF UI

Created with โค in Poland by lepo.co
A simple way to make your application written in WPF keep up with modern design trends. Library changes the base elements like Page, ToggleButton or List, and also includes additional controls like Navigation, NumberBox, Dialog or Snackbar.

GitHub license Nuget Nuget (with prereleases) Nuget Size Sponsors

๐Ÿ“ What's included?

Name Framework Build Status
WPFUI
Library that allows you to use all features in your own application
NET6 NET5
NETCore3
NETFramework48
NETFramework47
NETFramework46
Build status
WPFUI.Demo
An application written in WPF .NET 6 where you can test the features.
NET6win Build status

๐Ÿ“ท Screenshots

Screen-4

Screen-1

Screen-5

๐Ÿ•น๏ธ Radiograph

Radiograph is an application written by me that uses WPF UI.

Screen-6

๐Ÿ› ๏ธ Custom controls

Control Namespace Description
NumberBox WPFUI.Controls Text field for entering numbers with the possibility of setting a mask.
Button WPFUI.Controls Custom button with additional parameters like an icon.
Card WPFUI.Controls Simple card compatible with the theme for displaying other elements.
CardAction WPFUI.Controls Inherited from the Button interactive card styled according to Fluent Design.
CardExpander WPFUI.Controls Inherited from the ContentControl control which can hide the collapsable content.
CardControl WPFUI.Controls Inherited from the Button control which displays an additional control on the right side of the card.
CardProfile WPFUI.Controls Simple element that displays an image in a circular frame like in default applications for Windows 11.
CodeBlock WPFUI.Controls Formats syntax and display a fragment of the source code.
Dialog WPFUI.Controls Displays a large card with a slightly transparent background and two action buttons.
Snackbar WPFUI.Controls Animated card with a notification displayed at the bottom of the application.
FontIcon WPFUI.Controls Represents a text element containing an icon glyph with selectable font family.
Icon WPFUI.Controls Represents a text element containing an icon glyph.
Hyperlink WPFUI.Controls Button that opens a URL in a web browser.
Navigation WPFUI.Controls Navigation styled as UWP apps.
NavigationStore WPFUI.Controls Navigation styled as Windows 11 Store app
NavigationFluent WPFUI.Controls Navigation styled as Windows 11 Settings app.
Breadcrumb WPFUI.Controls Automatic display of the page title from the navigation in the application.
Rating WPFUI.Controls Stars to display the rating.
MessageBox WPFUI.Controls Custom window to display notifications outside the application.
TitleBar WPFUI.Controls A set of buttons that can replace the default window navigation, giving it a new, modern look with implemented NotifyIcon.

๐Ÿงฉ Custom classes and tools

Class Namespace Description
Manager WPFUI.Background Allows to add background effects like Mica or Acrylic.
Manager WPFUI.Theme Allows to manage available color themes from the library.
Watcher WPFUI.Theme Listens for SystemParameters changes while waiting for StaticPropertyChanged to change, then switches theme with Manager.Switch.
Progress WPFUI.Taskbar Allows to change the status of the displayed notification in the application icon on the TaskBar.
NotifyIcon WPFUI.Tray It allows you to create an icon and a menu in the tray.

๐Ÿ–Œ๏ธ XAML styles for use in the application.

Resource usage Description
<Window Style="{StaticResource UiWindow}"/> Add a custom appearance to the window and removes the navigation buttons.
<Page Style="{StaticResource UiPage}"/> Add a custom appearance to the page.
<Page Style="{StaticResource UiPageScrollable}"/> Add a custom appearance to the page and automatic display of scrolling if the content is too long.

๐Ÿ“ How to use?

First, your application needs to load custom styles, add in the MyApp\App.xaml file:

<Application>
  <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/WPFUI;component/Styles/Theme/Dark.xaml" />
        <ResourceDictionary Source="pack://application:,,,/WPFUI;component/Styles/WPFUI.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Application.Resources>
</Application>

Now, you can customize your views, for example by adding a non-standard look to the main window and navigation buttons

<Window
  xmlns:wpfui="clr-namespace:WPFUI.Controls;assembly=WPFUI"
  Style="{StaticResource UiWindow}">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <wpfui:TitleBar Grid.Row="0" ApplicationNavigation="True" />

    <Grid Grid.Row="1" Margin="12,6,12,12">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>

      <wpfui:NavigationFluent Grid.Column="0" Margin="0,0,12,0" />

      <Frame Grid.Column="1" />
    </Grid>
  </Grid>
</Window>

Special thanks

Crafting apps for .NET without the creators of tools like ReSharper or XAML Styler would never be such a fantastic adventure.

Microsoft Property

Design of the interface, choice of colors and the appearance of the controls were inspired by projects made by Microsoft for Windows 11.
The WPFUI.Demo app includes icons from Shell32 for Windows 11. These icons are the legal property of Microsoft and you may not use them in your own app without permission. They are used here as an example of creating tools for Microsoft systems.

Segoe Fluent Icons

According to the EULA of Segoe Fluent Icons we cannot ship a copy of it with this dll. Segoe Fluent Icons is installed by default on Windows 11, but if you want these icons in an application for Windows 10 and below, you must manually add the font to your application's resources.
https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font
https://docs.microsoft.com/en-us/windows/apps/design/downloads/#fonts

In the app dictionaries, you can add an alternate path to the font

<FontFamily x:Key="SegoeFluentIcons">pack://application:,,,/;component/Fonts/#Segoe Fluent Icons</FontFamily>

Compilation

Use Visual Studio 2022 and invoke the .sln.

Visual Studio
WPF UI is an Open Source project. You are entitled to download and use the freely available Visual Studio Community Edition to build, run or develop for WPF UI. As per the Visual Studio Community Edition license, this applies regardless of whether you are an individual or a corporate user.

License

WPF UI is free and open source software licensed under MIT License. You can use it in private and commercial projects.
Keep in mind that you must include a copy of the license in your project.

wpfui's People

Contributors

aelarion avatar dependabot[bot] avatar majorxaml avatar pomianowski avatar timheuer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.