mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-03 23:56:36 +08:00
commit: define project structure.
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
|
||||
<LangVersion>10</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Themes\Dark" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Avalonia.Themes.Semi
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
7
src/Avalonia.Themes.Semi/Controls/Controls.axaml
Normal file
7
src/Avalonia.Themes.Semi/Controls/Controls.axaml
Normal file
@@ -0,0 +1,7 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Semi/Controls/Window.axaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
30
src/Avalonia.Themes.Semi/Controls/Window.axaml
Normal file
30
src/Avalonia.Themes.Semi/Controls/Window.axaml
Normal file
@@ -0,0 +1,30 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ControlTheme x:Key="{x:Type Window}" TargetType="Window">
|
||||
<Setter Property="Background" Value="{DynamicResource WindowDefaultBackground}"/>
|
||||
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource WindowDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowDefaultForeground}"/>
|
||||
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}"/>
|
||||
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Panel>
|
||||
<Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
|
||||
<Border Background="{TemplateBinding Background}" IsHitTestVisible="False" />
|
||||
<Panel Background="Transparent" Margin="{TemplateBinding WindowDecorationMargin}" />
|
||||
<VisualLayerManager>
|
||||
<VisualLayerManager.ChromeOverlayLayer>
|
||||
<TitleBar />
|
||||
</VisualLayerManager.ChromeOverlayLayer>
|
||||
<ContentPresenter Name="PART_ContentPresenter"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Content="{TemplateBinding Content}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</VisualLayerManager>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
8
src/Avalonia.Themes.Semi/Themes/Light/Light.axaml
Normal file
8
src/Avalonia.Themes.Semi/Themes/Light/Light.axaml
Normal file
@@ -0,0 +1,8 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Semi/Themes/Light/Palette.axaml"/>
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Semi/Themes/Light/Window.axaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
4
src/Avalonia.Themes.Semi/Themes/Light/Palette.axaml
Normal file
4
src/Avalonia.Themes.Semi/Themes/Light/Palette.axaml
Normal file
@@ -0,0 +1,4 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
</ResourceDictionary>
|
||||
6
src/Avalonia.Themes.Semi/Themes/Light/Window.axaml
Normal file
6
src/Avalonia.Themes.Semi/Themes/Light/Window.axaml
Normal file
@@ -0,0 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
<SolidColorBrush x:Key="WindowDefaultBackground" Color="White"/>
|
||||
<SolidColorBrush x:Key="WindowDefaultForeground" Color="Black"/>
|
||||
</ResourceDictionary>
|
||||
9
src/Avalonia.Themes.Semi/Themes/LightTheme.axaml
Normal file
9
src/Avalonia.Themes.Semi/Themes/LightTheme.axaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<!-- Add Resources Here -->
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Semi/Themes/Light/Light.axaml"/>
|
||||
<ResourceInclude Source="avares://Avalonia.Themes.Semi/Controls/Controls.axaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user