This commit is contained in:
Jumar Macato 2023-10-06 22:32:18 +08:00
Родитель 57f500acf7
Коммит 44240ee198
3 изменённых файлов: 12 добавлений и 7 удалений

Просмотреть файл

@ -1,6 +1,7 @@
using System; using System;
using Avalonia.Animation; using Avalonia.Animation;
using Avalonia.Controls; using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml; using Avalonia.Markup.Xaml;
namespace ControlCatalogStandalone.Pages namespace ControlCatalogStandalone.Pages
@ -11,14 +12,14 @@ namespace ControlCatalogStandalone.Pages
{ {
InitializeComponent(); InitializeComponent();
} }
protected override void OnLoaded() protected override void OnLoaded(RoutedEventArgs e)
{ {
left.Click += (s, e) => carousel?.Previous(); left.Click += (s, e) => carousel?.Previous();
right.Click += (s, e) => carousel?.Next(); right.Click += (s, e) => carousel?.Next();
transition.SelectionChanged += TransitionChanged; transition.SelectionChanged += TransitionChanged;
orientation.SelectionChanged += TransitionChanged; orientation.SelectionChanged += TransitionChanged;
base.OnLoaded(); base.OnLoaded(e);
} }
private void TransitionChanged(object? sender, SelectionChangedEventArgs e) private void TransitionChanged(object? sender, SelectionChangedEventArgs e)

Просмотреть файл

@ -13,7 +13,7 @@ namespace ControlCatalogStandalone.Pages
public partial class GesturePage : UserControl public partial class GesturePage : UserControl
{ {
private bool _isInit; private bool _isInit;
private float _currentScale; private double _currentScale;
public GesturePage() public GesturePage()
{ {
@ -65,7 +65,7 @@ namespace ControlCatalogStandalone.Pages
} }
_currentScale = 1; _currentScale = 1;
Vector3 currentOffset = default; Vector3D currentOffset = default;
CompositionVisual? compositionVisual = null; CompositionVisual? compositionVisual = null;
@ -153,7 +153,7 @@ namespace ControlCatalogStandalone.Pages
var ball = control.FindLogicalDescendantOfType<Border>(); var ball = control.FindLogicalDescendantOfType<Border>();
Vector3 defaultOffset = default; Vector3D defaultOffset = default;
CompositionVisual? ballCompositionVisual = null; CompositionVisual? ballCompositionVisual = null;

Просмотреть файл

@ -1,6 +1,10 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AvaloniaVersion>11.0.0</AvaloniaVersion> <AvaloniaVersion>11.0.999-cibuild0040511-beta</AvaloniaVersion>
<RestoreSources>
https://api.nuget.org/v3/index.json;
https://nuget-feed-nightly.avaloniaui.net/v3/index.json;
</RestoreSources>
</PropertyGroup> </PropertyGroup>
</Project> </Project>