1 Star 0 Fork 0

NLNet / Avalonia.Css

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


acss-brand

Avalonia Css, or Acss for short, does not follow the standard CSS (Cascading Style Sheets). It is designed to separate the structural and visual definitions of Avalonia UI and empower the Avalonia with the ability to dynamically modify styles quickly.

Yes, it follows a pattern similar to Html+CSS.

Many thanks to Jet Brains for developer tools free of charge.

Features

  • Separation of Structure and Style
  • Structure Reuse
  • Dynamic Loading
  • Hot Loading
  • Intercept and Filter
  • Behavioral Extensions
  • Syntax Extensions
  • Style Debugging
  • Custom Drawing

Documentation

Documentation is available here. Note that documentation for English is translated from Chinese by DeepL. If you have any problem with it, you are welcome to edit it in github.

中文文档请参考 这里

Usage

Please see here for using Acss.

Contribution

We hope more interested partners could join us in creating Acss, making it more vibrant and capable.

If you're interested in getting involved or have any ideas, suggestions, or feedback, please send an email to yangqi1990917@163.com.

Showcase

We provide fluent theme for Avalonia controls powered by Acss. More about the theme please see Acss.Fluent.

See more about the acss showcase in bilibili or youtube.


fluent ui

Why Using Acss

Theme = Structure + Styles

Imagine we have a standard control library, where the functionality of its controls depends on the structure within their templates. If we want to modify the look of the controls, we usually need to rewrite all ControlTheme of them. This means we have to rewrite the control structure and the styles, even the resources. It's a painful work.

Picture that with the Acss pattern, we extract the styles from the standard themes of the controls, retaining only the skeletal structure, the ControlTemplate. Any library can base on the standard structures, defining its own Acss library to achieve the desired look for the controls. Creators of those libraries don't need to painfully copy existing ControlTheme code for modifications. They don't need to worry about whether the control template is correct. The only thing they should concern is adjusting styles based on UI design!

Continuous focus makes our work smoother, more elegant, and more effective.

Another case is when we create a new page, the traditional workflow usually involves layout, content population, writing business logic, style adjustments, and fine-tuning based on UI design. This is typically a developer's work, requiring continuous attention until the page is finished. Now, with the Acss pattern, the approach would involve functional personnel populating page content, writing business logic, and then handing it over to those who focus on visuals to harmonize the visual styles.

Packages We Provided

  • Nlnet.Avalonia.Css. This is the core for Acss.

  • Nlnet.Avalonia.Css.Controls. This library provides pure structures for the controls of Avalonia.Controls.

  • Nlnet.Avalonia.Css.Fluent. This library provides Fluent UI for Avalonia.Controls ,Nlnet.Avalonia.Senior and Nlnet.Avalonia.MessageBox.

  • Nlnet.Avalonia.Css.Behaviors. This library provides extended behaviors for Acss.

  • Nlnet.Avalonia.Senior. This library provides some extended features like smooth scrolling and other senior features that Avalonia.Controls can not provide.

  • Nlnet.Avalonia.MessageBox. This provides a MessageBox control that can follow WPF standard or Avalonia standard.

MIT License Copyright (c) 2023 NLNet 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.

简介

Enable css for avalonia. 展开 收起
C# 等 5 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/NLNet/avalonia.css.git
git@gitee.com:NLNet/avalonia.css.git
NLNet
avalonia.css
Avalonia.Css
main

搜索帮助