mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-06-07 02:18:17 +08:00
Compare commits
4 Commits
decoration
...
v12.0.3
| Author | SHA1 | Date | |
|---|---|---|---|
| d958abc1e5 | |||
| 27810e4ca1 | |||
| 0ab36a1ab2 | |||
| 77acd07732 |
@@ -233,6 +233,9 @@ indent_size = 2
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
# Shell scripts
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
|
||||
@@ -35,6 +35,14 @@ on:
|
||||
description: 'macOS arm64 AOT'
|
||||
default: false
|
||||
type: boolean
|
||||
osx-x64:
|
||||
description: 'macOS Intel x64'
|
||||
default: false
|
||||
type: boolean
|
||||
osx-x64-aot:
|
||||
description: 'macOS Intel x64 AOT'
|
||||
default: false
|
||||
type: boolean
|
||||
android-arm64:
|
||||
description: 'Android arm64'
|
||||
default: false
|
||||
@@ -65,6 +73,12 @@ on:
|
||||
osx-arm64-aot:
|
||||
type: boolean
|
||||
default: true
|
||||
osx-x64:
|
||||
type: boolean
|
||||
default: true
|
||||
osx-x64-aot:
|
||||
type: boolean
|
||||
default: true
|
||||
android-arm64:
|
||||
type: boolean
|
||||
default: true
|
||||
@@ -180,6 +194,33 @@ jobs:
|
||||
uses: actions/checkout@v6
|
||||
- name: Publish osx-arm64
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-arm64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
|
||||
|
||||
- name: Create .app bundle and DMG (create-dmg)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
APP_DIR="bundle/Semi.Avalonia.Demo.app"
|
||||
MACOS_DIR="${APP_DIR}/Contents/MacOS"
|
||||
mkdir -p "${MACOS_DIR}"
|
||||
cp -R publish/. "${MACOS_DIR}/"
|
||||
chmod +x "${MACOS_DIR}/Semi.Avalonia.Demo.Desktop"
|
||||
cp publish/Info-macOS.plist "${APP_DIR}/Contents/Info.plist"
|
||||
codesign --force --deep --sign - "${APP_DIR}"
|
||||
mkdir -p dmg_stage
|
||||
ditto "${APP_DIR}" "dmg_stage/Semi.Avalonia.Demo.app"
|
||||
brew install create-dmg
|
||||
rm -f Semi.Avalonia.Demo.Desktop.osx-arm64.dmg
|
||||
create-dmg \
|
||||
--volname "Semi Avalonia Demo" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 640 400 \
|
||||
--icon-size 100 \
|
||||
--icon "Semi.Avalonia.Demo.app" 175 185 \
|
||||
--hide-extension "Semi.Avalonia.Demo.app" \
|
||||
--app-drop-link 455 185 \
|
||||
--skip-jenkins \
|
||||
"Semi.Avalonia.Demo.Desktop.osx-arm64.dmg" \
|
||||
"dmg_stage"
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
@@ -188,6 +229,62 @@ jobs:
|
||||
publish
|
||||
!publish/*.pdb
|
||||
|
||||
- name: Upload macOS DMG
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.osx-arm64.dmg
|
||||
path: Semi.Avalonia.Demo.Desktop.osx-arm64.dmg
|
||||
|
||||
osx-x64:
|
||||
if: ${{inputs.osx-x64}}
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Publish osx-x64
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-x64 -c Release -o publish --sc /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
|
||||
|
||||
- name: Create .app bundle and DMG (create-dmg)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
APP_DIR="bundle/Semi.Avalonia.Demo.app"
|
||||
MACOS_DIR="${APP_DIR}/Contents/MacOS"
|
||||
mkdir -p "${MACOS_DIR}"
|
||||
cp -R publish/. "${MACOS_DIR}/"
|
||||
chmod +x "${MACOS_DIR}/Semi.Avalonia.Demo.Desktop"
|
||||
cp publish/Info-macOS.plist "${APP_DIR}/Contents/Info.plist"
|
||||
codesign --force --deep --sign - "${APP_DIR}"
|
||||
mkdir -p dmg_stage
|
||||
ditto "${APP_DIR}" "dmg_stage/Semi.Avalonia.Demo.app"
|
||||
brew install create-dmg
|
||||
rm -f Semi.Avalonia.Demo.Desktop.osx-x64.dmg
|
||||
create-dmg \
|
||||
--volname "Semi Avalonia Demo" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 640 400 \
|
||||
--icon-size 100 \
|
||||
--icon "Semi.Avalonia.Demo.app" 175 185 \
|
||||
--hide-extension "Semi.Avalonia.Demo.app" \
|
||||
--app-drop-link 455 185 \
|
||||
--skip-jenkins \
|
||||
"Semi.Avalonia.Demo.Desktop.osx-x64.dmg" \
|
||||
"dmg_stage"
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.osx-x64
|
||||
path: |
|
||||
publish
|
||||
!publish/*.pdb
|
||||
|
||||
- name: Upload macOS DMG (Intel)
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.osx-x64.dmg
|
||||
path: Semi.Avalonia.Demo.Desktop.osx-x64.dmg
|
||||
|
||||
osx-arm64-aot:
|
||||
if: ${{inputs.osx-arm64-aot}}
|
||||
runs-on: macos-latest
|
||||
@@ -206,6 +303,24 @@ jobs:
|
||||
publish
|
||||
!publish/*.pdb
|
||||
|
||||
osx-x64-aot:
|
||||
if: ${{inputs.osx-x64-aot}}
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- name: Enable Native AOT in .csproj
|
||||
run: sed -i '' 's#<!--<PublishAot>true</PublishAot>-->#<PublishAot>true</PublishAot>#' demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj
|
||||
- name: Publish osx-x64 AOT
|
||||
run: dotnet publish demo/Semi.Avalonia.Demo.Desktop -r osx-x64 -c Release -o publish
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Semi.Avalonia.Demo.Desktop.osx-x64.NativeAOT
|
||||
path: |
|
||||
publish
|
||||
!publish/*.pdb
|
||||
|
||||
android-arm64:
|
||||
if: ${{inputs.android-arm64 }}
|
||||
runs-on: windows-latest
|
||||
|
||||
@@ -58,6 +58,10 @@ jobs:
|
||||
zip -rj Semi.Avalonia.Demo.Desktop.osx-arm64.zip Semi.Avalonia.Demo.Desktop.osx-arm64
|
||||
cd Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT
|
||||
zip -r ../Semi.Avalonia.Demo.Desktop.osx-arm64.NativeAOT.zip .
|
||||
cd "${GITHUB_WORKSPACE}"
|
||||
zip -rj Semi.Avalonia.Demo.Desktop.osx-x64.zip Semi.Avalonia.Demo.Desktop.osx-x64
|
||||
cd Semi.Avalonia.Demo.Desktop.osx-x64.NativeAOT
|
||||
zip -r ../Semi.Avalonia.Demo.Desktop.osx-x64.NativeAOT.zip .
|
||||
|
||||
- name: Display structure of zipped files
|
||||
run: ls -R
|
||||
@@ -71,4 +75,6 @@ jobs:
|
||||
files: |
|
||||
nugets/*.nupkg
|
||||
android-arm64/*.apk
|
||||
*.zip
|
||||
*.zip
|
||||
Semi.Avalonia.Demo.Desktop.osx-arm64.dmg/Semi.Avalonia.Demo.Desktop.osx-arm64.dmg
|
||||
Semi.Avalonia.Demo.Desktop.osx-x64.dmg/Semi.Avalonia.Demo.Desktop.osx-x64.dmg
|
||||
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
<CentralPackageVersionOverrideEnabled>true</CentralPackageVersionOverrideEnabled>
|
||||
<AvaloniaVersion>12.0.1</AvaloniaVersion>
|
||||
<AvaloniaVersion>12.0.3</AvaloniaVersion>
|
||||
<DataGridVersion>12.0.0</DataGridVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
+1
-2
@@ -18,11 +18,10 @@
|
||||
<Folder Name="/Solution Items/">
|
||||
<File Path="Directory.Packages.props"/>
|
||||
<File Path="global.json"/>
|
||||
<File Path="Nuget.Config"/>
|
||||
<File Path="NuGet.Config"/>
|
||||
</Folder>
|
||||
<Folder Name="/Solution Items/Demo/">
|
||||
<File Path="demo/Directory.Build.targets"/>
|
||||
<File Path="demo/global.json"/>
|
||||
</Folder>
|
||||
<Folder Name="/Solution Items/Src/">
|
||||
<File Path="src/Directory.Build.props"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AvaloniaVersion>12.0.2</AvaloniaVersion>
|
||||
<AvaloniaVersion>12.0.3</AvaloniaVersion>
|
||||
<DataGridVersion>12.0.0</DataGridVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Semi.Avalonia.Demo.Desktop</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.avaloniaui.SemiAvaloniaDemo</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Semi Avalonia Demo</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(Version)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(Version)</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.15</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,33 +1,56 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
||||
<!-- Uncomment below to enable Native AOT compilation-->
|
||||
<!--<PublishAot>true</PublishAot>-->
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Version>1.0.0</Version>
|
||||
<Nullable>enable</Nullable>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
||||
<!-- Uncomment below to enable Native AOT compilation-->
|
||||
<!--<PublishAot>true</PublishAot>-->
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
|
||||
<IsTrimmable>true</IsTrimmable>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TrimmerRootDescriptor Include="Roots.xml"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<TrimmerRootDescriptor Include="Roots.xml"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Desktop"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia.Desktop"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
||||
<ProjectReference Include="..\Semi.Avalonia.Demo.Fonts\Semi.Avalonia.Demo.Fonts.csproj"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
||||
<ProjectReference Include="..\Semi.Avalonia.Demo.Fonts\Semi.Avalonia.Demo.Fonts.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<UsingTask TaskName="ExpandMacOSPlistVersion" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
|
||||
<ParameterGroup>
|
||||
<InputFile ParameterType="System.String" Required="true"/>
|
||||
<OutputFile ParameterType="System.String" Required="true"/>
|
||||
<AppVersion ParameterType="System.String" Required="true"/>
|
||||
</ParameterGroup>
|
||||
<Task>
|
||||
<Code Type="Fragment" Language="cs"><![CDATA[
|
||||
var token = "$" + "(Version)";
|
||||
System.IO.File.WriteAllText(
|
||||
OutputFile,
|
||||
System.IO.File.ReadAllText(InputFile).Replace(token, AppVersion));
|
||||
]]></Code>
|
||||
</Task>
|
||||
</UsingTask>
|
||||
<Target Name="ExpandMacOSInfoPlist" AfterTargets="Publish">
|
||||
<ExpandMacOSPlistVersion
|
||||
InputFile="$(MSBuildProjectDirectory)/Info-macOS.plist"
|
||||
OutputFile="$(PublishDir)Info-macOS.plist"
|
||||
AppVersion="$(Version)"/>
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<ScrollViewer DockPanel.Dock="Right" Width="260">
|
||||
<StackPanel Margin="12" Spacing="8">
|
||||
<TextBlock Text="Configuration" FontWeight="SemiBold" FontSize="16" />
|
||||
<TextBlock Text="Navigation" FontWeight="SemiBold" FontSize="13" />
|
||||
<TextBlock Text="Navigation" FontWeight="SemiBold" FontSize="14" />
|
||||
|
||||
<Button Content="Push Page"
|
||||
HorizontalAlignment="Stretch"
|
||||
@@ -26,6 +26,20 @@
|
||||
|
||||
<Separator />
|
||||
|
||||
<TextBlock Text="Modal Actions" FontWeight="SemiBold" FontSize="14" />
|
||||
<Button Name="PushModalButton"
|
||||
Content="Push Modal"
|
||||
HorizontalAlignment="Stretch"
|
||||
Click="OnPushModal" />
|
||||
<Button Name="PopModalButton"
|
||||
Content="Pop Modal"
|
||||
HorizontalAlignment="Stretch"
|
||||
Click="OnPopModal" />
|
||||
<Button Name="PopAllModalsButton"
|
||||
Content="Pop All Modals"
|
||||
HorizontalAlignment="Stretch"
|
||||
Click="OnPopAllModals" />
|
||||
|
||||
<TextBlock Text="Options" FontWeight="SemiBold" FontSize="14" />
|
||||
|
||||
<CheckBox Name="HasNavBarCheck"
|
||||
@@ -34,21 +48,39 @@
|
||||
IsCheckedChanged="OnHasNavBarChanged" />
|
||||
<CheckBox Name="HasBackButtonCheck"
|
||||
Content="Has Back Button"
|
||||
IsChecked="True"
|
||||
IsCheckedChanged="OnHasBackButonChanged" />
|
||||
IsChecked="True"
|
||||
IsCheckedChanged="OnHasBackButtonChanged" />
|
||||
<CheckBox Name="HasShadowCheck"
|
||||
Content="Has Shadow"
|
||||
IsChecked="True"
|
||||
IsCheckedChanged="OnHasShadowChanged" />
|
||||
<CheckBox Name="large" Content="Large" />
|
||||
|
||||
<Separator />
|
||||
|
||||
<TextBlock Text="Modal Transition" FontWeight="SemiBold" FontSize="14" />
|
||||
<ComboBox Name="TransitionCombo"
|
||||
SelectedIndex="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
SelectionChanged="OnTransitionChanged">
|
||||
<ComboBoxItem Content="Slide from Bottom" />
|
||||
<ComboBoxItem Content="CrossFade" />
|
||||
<ComboBoxItem Content="None" />
|
||||
</ComboBox>
|
||||
|
||||
<Separator />
|
||||
|
||||
<TextBlock Text="Status" FontWeight="SemiBold" FontSize="14" />
|
||||
<TextBlock Name="StatusText"
|
||||
Text="Depth: 1"
|
||||
Opacity="0.7"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock Name="HeaderText"
|
||||
Text="Current: Home"
|
||||
Opacity="0.7"
|
||||
TextWrapping="Wrap" />
|
||||
<ToggleSwitch Content="Large" Name="large" />
|
||||
<TextBlock Name="ModalText"
|
||||
Text="Modals: 0"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -59,8 +91,8 @@
|
||||
BorderThickness="1"
|
||||
CornerRadius="6"
|
||||
ClipToBounds="True">
|
||||
<NavigationPage
|
||||
Name="DemoNav"
|
||||
<NavigationPage
|
||||
Name="DemoNav"
|
||||
Classes.Large="{Binding #large.IsChecked}" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using System;
|
||||
using Avalonia.Animation;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
@@ -6,6 +8,7 @@ namespace Semi.Avalonia.Demo.Pages;
|
||||
public partial class NavigationPageDemo : UserControl
|
||||
{
|
||||
private int _pageCount;
|
||||
private int _modalCount;
|
||||
|
||||
public NavigationPageDemo()
|
||||
{
|
||||
@@ -15,7 +18,7 @@ public partial class NavigationPageDemo : UserControl
|
||||
|
||||
private async void OnLoaded(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
await DemoNav.PushAsync(NavigationDemoHelper.MakePage("Home", "Welcome!\nUse the buttons to push and pop pages.", 0), null);
|
||||
await DemoNav.PushAsync(NavigationDemoHelper.MakePage("Home", "Welcome!\nUse the buttons to push and pop pages/modals.", 0), null);
|
||||
UpdateStatus();
|
||||
}
|
||||
|
||||
@@ -42,6 +45,27 @@ public partial class NavigationPageDemo : UserControl
|
||||
UpdateStatus();
|
||||
}
|
||||
|
||||
private async void OnPushModal(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_modalCount++;
|
||||
var modal = NavigationDemoHelper.MakePage($"Modal {_modalCount}", "This page was presented modally.\nTap 'Pop Modal' to dismiss.", _modalCount);
|
||||
await DemoNav.PushModalAsync(modal);
|
||||
UpdateStatus();
|
||||
}
|
||||
|
||||
private async void OnPopModal(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
await DemoNav.PopModalAsync();
|
||||
UpdateStatus();
|
||||
}
|
||||
|
||||
private async void OnPopAllModals(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
await DemoNav.PopAllModalsAsync();
|
||||
_modalCount = 0;
|
||||
UpdateStatus();
|
||||
}
|
||||
|
||||
private void OnHasNavBarChanged(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DemoNav == null)
|
||||
@@ -50,7 +74,7 @@ public partial class NavigationPageDemo : UserControl
|
||||
NavigationPage.SetHasNavigationBar(DemoNav.CurrentPage, HasNavBarCheck.IsChecked == true);
|
||||
}
|
||||
|
||||
private void OnHasBackButonChanged(object? sender, RoutedEventArgs e)
|
||||
private void OnHasBackButtonChanged(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DemoNav == null)
|
||||
return;
|
||||
@@ -58,9 +82,30 @@ public partial class NavigationPageDemo : UserControl
|
||||
NavigationPage.SetHasBackButton(DemoNav.CurrentPage, HasBackButtonCheck.IsChecked == true);
|
||||
}
|
||||
|
||||
private void OnHasShadowChanged(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DemoNav == null)
|
||||
return;
|
||||
if (DemoNav.CurrentPage != null)
|
||||
DemoNav.HasShadow = HasShadowCheck.IsChecked == true;
|
||||
}
|
||||
|
||||
private void OnTransitionChanged(object? sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (DemoNav == null)
|
||||
return;
|
||||
DemoNav.ModalTransition = TransitionCombo.SelectedIndex switch
|
||||
{
|
||||
1 => new CrossFade(TimeSpan.FromMilliseconds(250)),
|
||||
2 => null,
|
||||
_ => new PageSlide(TimeSpan.FromMilliseconds(300), PageSlide.SlideAxis.Vertical)
|
||||
};
|
||||
}
|
||||
|
||||
private void UpdateStatus()
|
||||
{
|
||||
StatusText.Text = $"Depth: {DemoNav.StackDepth}";
|
||||
HeaderText.Text = $"Current: {DemoNav.CurrentPage?.Header ?? "(none)"}";
|
||||
ModalText.Text = $"Modals: {DemoNav.ModalStack.Count}";
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@
|
||||
<Style Selector="Border.NavItemHost">
|
||||
<Setter Property="Margin" Value="6,0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource SemiBorderRadiusSmall}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.NavItemHost.Selected">
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
|
||||
<Version>12.0.1</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 12.0.1</PackageReleaseNotes>
|
||||
<Version>12.0.3</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia.ColorPicker 12.0.3</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia.ColorPicker</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -8,6 +8,26 @@
|
||||
<ControlTheme x:Key="{x:Type NavigationPage}" TargetType="NavigationPage">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BarHeight" Value="{DynamicResource NavigationPageBarMinHeight}" />
|
||||
<Setter Property="PageTransition">
|
||||
<PageSlide Duration="0:0:0.3" Orientation="Horizontal" FillMode="Forward">
|
||||
<PageSlide.SlideInEasing>
|
||||
<SplineEasing X1="0.16" Y1="1" X2="0.3" Y2="1" />
|
||||
</PageSlide.SlideInEasing>
|
||||
<PageSlide.SlideOutEasing>
|
||||
<SplineEasing X1="0.2" Y1="0.85" X2="0.3" Y2="1" />
|
||||
</PageSlide.SlideOutEasing>
|
||||
</PageSlide>
|
||||
</Setter>
|
||||
<Setter Property="ModalTransition">
|
||||
<PageSlide Duration="0:0:0.25" Orientation="Vertical" FillMode="Forward">
|
||||
<PageSlide.SlideInEasing>
|
||||
<SplineEasing X1="0.16" Y1="1" X2="0.3" Y2="1" />
|
||||
</PageSlide.SlideInEasing>
|
||||
<PageSlide.SlideOutEasing>
|
||||
<SplineEasing X1="0.2" Y1="0.85" X2="0.3" Y2="1" />
|
||||
</PageSlide.SlideOutEasing>
|
||||
</PageSlide>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="NavigationPage">
|
||||
<Panel ClipToBounds="True">
|
||||
@@ -115,7 +135,7 @@
|
||||
<Style Selector="^:nav-bar-compact /template/ ContentPresenter#PART_TopCommandBar CommandBar">
|
||||
<Setter Property="DefaultLabelPosition" Value="Collapsed" />
|
||||
</Style>
|
||||
|
||||
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="BarHeight" Value="{DynamicResource NavigationPageBarLargeMinHeight}" />
|
||||
</Style>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
|
||||
<Version>12.0.1</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia 12.0.1</PackageReleaseNotes>
|
||||
<Version>12.0.3</Version>
|
||||
<PackageReleaseNotes>Update to Semi.Avalonia 12.0.3</PackageReleaseNotes>
|
||||
<Title>Semi.Avalonia</Title>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user