Chinese | English
Windows desktop version WeChat UI interface library implemented based on WPF
An unofficial UI library for Windows WeChat based on WPF implementation
.NET Framework >= 4.7.2
Multi-language dynamic switching
Theme dynamic switching (TODO: dark theme)
MIT license, open source and commercially available
Create a WPF project based on .NET Framework 4.7.2+ (recommended use: Prism framework, use Prism template to create the project directly);
NuGet install WeUiSharp
Modify the file App.xaml
and add the following resources:
<Application.Resources><!-- The following part is to add content --><ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/WeUiSharp;component/ControlsResources.xaml"/> <weui:ThemeResources RequestedTheme="Light"> <weui:ThemeResources.ThemeDictionaries> <ResourceDictionary x:Key="Light"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/WeUiSharp;component/ThemeResources/Light.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> <ResourceDictionary x:Key="Dark"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/WeUiSharp;component/ThemeResources/Dark.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </weui:ThemeResources.ThemeDictionaries> </weui:ThemeResources> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources>
Modify the file MainWindow.xaml
, change Window
to weui:Window
, and add a reference to weui
:
<weui:Window xmlns:weui="https://github.com/IUpdatable/WeUiSharp" Title="Hello WeUiSharp"... > <Grid> </Grid> </weui:Window>
Modify MainWindow.xaml.cs
and cancel the inheritance relationship from Window
public partial class MainWindow{public MainWindow(){InitializeComponent();}}
Compile and run, and you should be able to see the following interface:
Complete code: WeUiSharp.HelloWorld
The complete code of Hello Wrorld project based on Prism framework: WeUiSharp.HelloWorldWithPrism
Window
Button
ToggleButton
PathButton
IconButton
Field
CheckBox
ComboBox
MessageBox
ContextMenu
Toast
Alert
MIT