Giter Site home page Giter Site logo

frunck8206 / weuisharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iupdatable/weuisharp

0.0 1.0 0.0 936 KB

基于 WPF 实现的仿 Windows 桌面版微信 UI 界面库 An unofficial UI library for Windows WeChat based on WPF implementation

C# 100.00%

weuisharp's Introduction

WeUiSharp

中文 | English

基于 WPF 实现的仿 Windows 桌面版微信 UI 界面库
An unofficial UI library for Windows WeChat based on WPF implementation

.NET Framework Version nuget-version Nuget

Features

  • .NET Framework >= 4.7.2
  • 多语言动态切换
  • 主题动态切换(TODO:深色主题)
  • MIT 协议,开源可商用

Overview

Overview

Getting Started

  1. 创建一个基于.NET Framework 4.7.2+ 的WPF项目(推荐使用:Prism 框架,直接使用 Prism模板 创建项目);
  2. NuGet 安装 WeUiSharp
  3. 修改文件 App.xaml,添加以下资源:
<Application.Resources>
    <!-- 下面部分为添加内容 -->
    <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>
  1. 修改文件 MainWindow.xaml,将 Window 改为 weui:Window,并添加 weui 的引用:
<weui:Window xmlns:weui="https://github.com/IUpdatable/WeUiSharp" Title="Hello WeUiSharp"
        ...
        >
    <Grid>
        
    </Grid>

</weui:Window>
  1. 修改 MainWindow.xaml.cs,取消从 Window 的继承关系
public partial class MainWindow
{
    public MainWindow()
    {
        InitializeComponent();
    }
}
  1. 编译运行,应该就可以看到下面效果的界面:

Hello Wrorld

完整代码:WeUiSharp.HelloWorld

基于 Prism 框架的 Hello Wrorld 项目完整代码: WeUiSharp.HelloWorldWithPrism

Components

Feedback

PS: 最近在找工作,有工作推荐的也可以联系我。

License

MIT

weuisharp's People

Contributors

iupdatable avatar

Watchers

James Cloos 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.