mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-05-01 13:39:27 +08:00
@@ -5,13 +5,11 @@
|
|||||||
|
|
||||||
Avalonia Theme inspired by Semi Design
|
Avalonia Theme inspired by Semi Design
|
||||||
|
|
||||||
> Semi.Avalonia is still in very early stage. Please don't use in production.
|
|
||||||
|
|
||||||
# How to Use
|
# How to Use
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia --version 0.1.0-preview8
|
dotnet add package Semi.Avalonia --version 11.0.0-rc1
|
||||||
```
|
```
|
||||||
Include Semi Design Styles in application:
|
Include Semi Design Styles in application:
|
||||||
|
|
||||||
@@ -25,8 +23,8 @@ That's all.
|
|||||||
|
|
||||||
DataGrid and ColorPicker are distributed in separated packages. Please install if you need.
|
DataGrid and ColorPicker are distributed in separated packages. Please install if you need.
|
||||||
```bash
|
```bash
|
||||||
dotnet add package Semi.Avalonia.ColorPicker --version 0.1.0-preview8
|
dotnet add package Semi.Avalonia.ColorPicker --version 11.0.0-rc1
|
||||||
dotnet add package Semi.Avalonia.DataGrid --version 0.1.0-preview8
|
dotnet add package Semi.Avalonia.DataGrid --version 11.0.0-rc1
|
||||||
```
|
```
|
||||||
```xaml
|
```xaml
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
@@ -44,6 +42,7 @@ https://github.com/irihitech/Semi.Avalonia/releases
|
|||||||
|
|
||||||
| Semi Design Version | Avalonia Version |
|
| Semi Design Version | Avalonia Version |
|
||||||
|:--------------------|:-----------------|
|
|:--------------------|:-----------------|
|
||||||
|
| 11.0.0-rc1 | 11.0.0-rc1.1 |
|
||||||
| 0.1.0-preview3 | 11.0-preview4 |
|
| 0.1.0-preview3 | 11.0-preview4 |
|
||||||
| 0.1.0-preview5.x | 11.0-preview5 |
|
| 0.1.0-preview5.x | 11.0-preview5 |
|
||||||
| 0.1.0-preview6.x | 11.0-preview6 |
|
| 0.1.0-preview6.x | 11.0-preview6 |
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AvaloniaVersion>11.0.0-preview8</AvaloniaVersion>
|
<AvaloniaVersion>11.0.0-rc1.1</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -5,8 +5,10 @@
|
|||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Semi.Avalonia.Demo.Pages.HeaderedContentControlDemo">
|
x:Class="Semi.Avalonia.Demo.Pages.HeaderedContentControlDemo">
|
||||||
<ScrollViewer>
|
<ScrollViewer>
|
||||||
<HeaderedContentControl Theme="{DynamicResource GroupBox}" Header="Semi Design">
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||||
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。</TextBlock>
|
<HeaderedContentControl Theme="{DynamicResource GroupBox}" Header="Semi Design">
|
||||||
</HeaderedContentControl>
|
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统。设计系统包含设计语言以及一整套可复用的前端组件,帮助设计师与开发者更容易地打造高质量的、用户体验一致的、符合设计规范的 Web 应用。</TextBlock>
|
||||||
|
</HeaderedContentControl>
|
||||||
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
<RepeatButton Classes="Primary">Primary</RepeatButton>
|
<RepeatButton Classes="Primary">Primary</RepeatButton>
|
||||||
<RepeatButton Classes="Secondary">Secondary</RepeatButton>
|
<RepeatButton Classes="Secondary">Secondary</RepeatButton>
|
||||||
<RepeatButton Classes="Tertiary">Tertiary</RepeatButton>
|
<RepeatButton Classes="Tertiary">Tertiary</RepeatButton>
|
||||||
|
<RepeatButton Classes="Success">Success</RepeatButton>
|
||||||
<RepeatButton Classes="Warning">Warning</RepeatButton>
|
<RepeatButton Classes="Warning">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger">Danger</RepeatButton>
|
<RepeatButton Classes="Danger">Danger</RepeatButton>
|
||||||
<RepeatButton Classes="Primary" IsEnabled="False">Danger</RepeatButton>
|
<RepeatButton Classes="Primary" IsEnabled="False">Danger</RepeatButton>
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
<RepeatButton Classes="Primary" Theme="{DynamicResource SolidRepeatButton}">Primary</RepeatButton>
|
<RepeatButton Classes="Primary" Theme="{DynamicResource SolidRepeatButton}">Primary</RepeatButton>
|
||||||
<RepeatButton Classes="Secondary" Theme="{DynamicResource SolidRepeatButton}">Secondary</RepeatButton>
|
<RepeatButton Classes="Secondary" Theme="{DynamicResource SolidRepeatButton}">Secondary</RepeatButton>
|
||||||
<RepeatButton Classes="Tertiary" Theme="{DynamicResource SolidRepeatButton}">Tertiary</RepeatButton>
|
<RepeatButton Classes="Tertiary" Theme="{DynamicResource SolidRepeatButton}">Tertiary</RepeatButton>
|
||||||
|
<RepeatButton Classes="Success" Theme="{DynamicResource SolidRepeatButton}">Success</RepeatButton>
|
||||||
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
|
<RepeatButton Classes="Warning" Theme="{DynamicResource SolidRepeatButton}">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
|
<RepeatButton Classes="Danger" Theme="{DynamicResource SolidRepeatButton}">Danger</RepeatButton>
|
||||||
<RepeatButton
|
<RepeatButton
|
||||||
@@ -36,6 +38,7 @@
|
|||||||
<RepeatButton Classes="Primary" Theme="{DynamicResource BorderlessRepeatButton}">Primary</RepeatButton>
|
<RepeatButton Classes="Primary" Theme="{DynamicResource BorderlessRepeatButton}">Primary</RepeatButton>
|
||||||
<RepeatButton Classes="Secondary" Theme="{DynamicResource BorderlessRepeatButton}">Secondary</RepeatButton>
|
<RepeatButton Classes="Secondary" Theme="{DynamicResource BorderlessRepeatButton}">Secondary</RepeatButton>
|
||||||
<RepeatButton Classes="Tertiary" Theme="{DynamicResource BorderlessRepeatButton}">Tertiary</RepeatButton>
|
<RepeatButton Classes="Tertiary" Theme="{DynamicResource BorderlessRepeatButton}">Tertiary</RepeatButton>
|
||||||
|
<RepeatButton Classes="Success" Theme="{DynamicResource BorderlessRepeatButton}">Success</RepeatButton>
|
||||||
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
|
<RepeatButton Classes="Warning" Theme="{DynamicResource BorderlessRepeatButton}">Warning</RepeatButton>
|
||||||
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
|
<RepeatButton Classes="Danger" Theme="{DynamicResource BorderlessRepeatButton}">Danger</RepeatButton>
|
||||||
<RepeatButton
|
<RepeatButton
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<Rectangle
|
<Rectangle
|
||||||
Width="300"
|
Width="300"
|
||||||
Height="300"
|
Height="300"
|
||||||
Fill="#FEFBCB" />
|
Fill="{DynamicResource SemiYellow2}" />
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
Width="200"
|
Width="200"
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<Rectangle
|
<Rectangle
|
||||||
Width="300"
|
Width="300"
|
||||||
Height="300"
|
Height="300"
|
||||||
Fill="#FEFBCB" />
|
Fill="{DynamicResource SemiYellow2}" />
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>10</LangVersion>
|
<LangVersion>10</LangVersion>
|
||||||
<Version>0.1.0-preview8</Version>
|
<Version>11.0.0-rc1</Version>
|
||||||
<Authors>IRIHI Technology</Authors>
|
<Authors>IRIHI Technology</Authors>
|
||||||
<Description>Avalonia Theme inspired by Semi Design. </Description>
|
<Description>Avalonia Theme inspired by Semi Design. </Description>
|
||||||
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/irihitech/Semi.Avalonia</PackageProjectUrl>
|
||||||
<AvaloniaVersion>11.0.0-preview8</AvaloniaVersion>
|
<AvaloniaVersion>11.0.0-rc1.1</AvaloniaVersion>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -135,8 +135,8 @@
|
|||||||
ColorComponent="{Binding ThirdComponent, ElementName=ColorSpectrum}"
|
ColorComponent="{Binding ThirdComponent, ElementName=ColorSpectrum}"
|
||||||
ColorModel="Hsva"
|
ColorModel="Hsva"
|
||||||
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
|
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
|
||||||
IsAlphaMaxForced="True"
|
IsAlphaVisible="True"
|
||||||
IsSaturationValueMaxForced="False"
|
IsPerceptive="False"
|
||||||
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
|
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
|
||||||
Orientation="Vertical" />
|
Orientation="Vertical" />
|
||||||
<primitives:ColorSpectrum
|
<primitives:ColorSpectrum
|
||||||
|
|||||||
@@ -227,8 +227,8 @@
|
|||||||
ColorComponent="{Binding ThirdComponent, ElementName=ColorSpectrum}"
|
ColorComponent="{Binding ThirdComponent, ElementName=ColorSpectrum}"
|
||||||
ColorModel="Hsva"
|
ColorModel="Hsva"
|
||||||
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
|
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum}"
|
||||||
IsAlphaMaxForced="True"
|
IsAlphaVisible="True"
|
||||||
IsSaturationValueMaxForced="False"
|
IsPerceptive="False"
|
||||||
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
|
IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}"
|
||||||
Orientation="Vertical" />
|
Orientation="Vertical" />
|
||||||
<primitives:ColorSpectrum
|
<primitives:ColorSpectrum
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||||
<PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to Avalonia 11.0.0-rc1</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia.DataGrid</Title>
|
<Title>Semi.Avalonia.DataGrid</Title>
|
||||||
<PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to Avalonia 11.0.0-rc1</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -214,13 +214,14 @@
|
|||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
|
HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
|
||||||
HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
|
HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
|
||||||
|
ScrollViewer.IsScrollInertiaEnabled="{TemplateBinding IsScrollInertiaEnabled}"
|
||||||
VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
|
VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
|
||||||
VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
|
VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
|
||||||
<ScrollContentPresenter.GestureRecognizers>
|
<ScrollContentPresenter.GestureRecognizers>
|
||||||
<ScrollGestureRecognizer
|
<ScrollGestureRecognizer
|
||||||
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
|
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
|
||||||
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
|
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
|
||||||
IsScrollInertiaEnabled="{Binding IsScrollInertiaEnabled, RelativeSource={RelativeSource TemplatedParent}}" />
|
IsScrollInertiaEnabled="{Binding (ScrollViewer.IsScrollInertiaEnabled), ElementName=PART_ContentPresenter}" />
|
||||||
</ScrollContentPresenter.GestureRecognizers>
|
</ScrollContentPresenter.GestureRecognizers>
|
||||||
</ScrollContentPresenter>
|
</ScrollContentPresenter>
|
||||||
<ScrollBar
|
<ScrollBar
|
||||||
@@ -263,13 +264,14 @@
|
|||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
|
HorizontalSnapPointsAlignment="{TemplateBinding HorizontalSnapPointsAlignment}"
|
||||||
HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
|
HorizontalSnapPointsType="{TemplateBinding HorizontalSnapPointsType}"
|
||||||
|
ScrollViewer.IsScrollInertiaEnabled="{TemplateBinding IsScrollInertiaEnabled}"
|
||||||
VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
|
VerticalSnapPointsAlignment="{TemplateBinding VerticalSnapPointsAlignment}"
|
||||||
VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
|
VerticalSnapPointsType="{TemplateBinding VerticalSnapPointsType}">
|
||||||
<ScrollContentPresenter.GestureRecognizers>
|
<ScrollContentPresenter.GestureRecognizers>
|
||||||
<ScrollGestureRecognizer
|
<ScrollGestureRecognizer
|
||||||
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
|
CanHorizontallyScroll="{Binding CanHorizontallyScroll, ElementName=PART_ContentPresenter}"
|
||||||
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
|
CanVerticallyScroll="{Binding CanVerticallyScroll, ElementName=PART_ContentPresenter}"
|
||||||
IsScrollInertiaEnabled="{Binding IsScrollInertiaEnabled, RelativeSource={RelativeSource TemplatedParent}}" />
|
IsScrollInertiaEnabled="{Binding (ScrollViewer.IsScrollInertiaEnabled), ElementName=PART_ContentPresenter}" />
|
||||||
</ScrollContentPresenter.GestureRecognizers>
|
</ScrollContentPresenter.GestureRecognizers>
|
||||||
</ScrollContentPresenter>
|
</ScrollContentPresenter>
|
||||||
<ScrollBar
|
<ScrollBar
|
||||||
|
|||||||
@@ -5,17 +5,29 @@
|
|||||||
<ControlTheme x:Key="{x:Type TransitioningContentControl}" TargetType="TransitioningContentControl">
|
<ControlTheme x:Key="{x:Type TransitioningContentControl}" TargetType="TransitioningContentControl">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
<ContentPresenter
|
<Panel>
|
||||||
Name="PART_ContentPresenter"
|
<ContentPresenter
|
||||||
Padding="{TemplateBinding Padding}"
|
Name="PART_ContentPresenter"
|
||||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
Padding="{TemplateBinding Padding}"
|
||||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
Background="{TemplateBinding Background}"
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
Content="{TemplateBinding CurrentContent}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
Content="{TemplateBinding Content}"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||||
|
<ContentPresenter
|
||||||
|
Name="PART_TransitionContentPresenter"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||||
|
</Panel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Title>Semi.Avalonia</Title>
|
<Title>Semi.Avalonia</Title>
|
||||||
<PackageReleaseNotes>Update to Avalonia 11.0.0-preview8</PackageReleaseNotes>
|
<PackageReleaseNotes>Update to Avalonia 11.0.0-rc1</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user