2 Star 4 Fork 0

monkey_cici/winui-python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

English | 简体中文

WinUI 3 with Python

此存储库提供了一个使用Python的WinUI 3示例。示例程序具有以下功能:

  • 加载XAML文件以布局UI组件.
  • 使用Fluent Design System支持WinUI 3控件.
  • Mica 应用.
  • 适应高分辨率DPI显示器.

py-win32more 用于为 WinUI 3 生成 “win32more”.

安装教程

  1. Python 3 版本
  2. 下载安装 Windows App Runtime
  3. 安装依赖库 pip install win32more
  4. 下载源码 git clone https://github.com/sotanakamura/winui-python

运行示例程序

第一次加载模块需要时间.

py winui-xaml.py

创建不带XAML文件的UI(以及处理事件)

您可以在不编写XAML文件的情况下构建自己的GUI。 此外,您可以使用自己的函数来处理事件,如下例所示。 *此示例使用RepeatButton的示例程序。

py winui-click.py
MIT License Copyright (c) 2023 Sota Nakamura Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Python WinUI 3 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者 (6)

全部

语言

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/monkeycc/winui-python.git
git@gitee.com:monkeycc/winui-python.git
monkeycc
winui-python
winui-python
main

搜索帮助