diff --git a/Material.Styles/Assists/ShadowAssist.cs b/Material.Styles/Assists/ShadowAssist.cs
index cd1040e1..fd47e6c3 100644
--- a/Material.Styles/Assists/ShadowAssist.cs
+++ b/Material.Styles/Assists/ShadowAssist.cs
@@ -2,6 +2,7 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
+using Material.Styles.Internal;
namespace Material.Styles.Assists {
public static class ShadowProvider {
diff --git a/Material.Styles/Assists/TransitionAssist.cs b/Material.Styles/Assists/TransitionAssist.cs
index ddc4fdfb..fe57e1df 100644
--- a/Material.Styles/Assists/TransitionAssist.cs
+++ b/Material.Styles/Assists/TransitionAssist.cs
@@ -1,11 +1,9 @@
-using System;
-using Avalonia;
+using Avalonia;
using Avalonia.Data;
+using Material.Styles.Internal;
-namespace Material.Styles.Assists
-{
- public static class TransitionAssist
- {
+namespace Material.Styles.Assists {
+ public static class TransitionAssist {
///
/// Allows transitions to be disabled where supported. Note this is an inheritable property.
///
@@ -13,10 +11,8 @@ public static class TransitionAssist
AvaloniaProperty.RegisterAttached(
"DisableTransitions", typeof(TransitionAssist), false, true, BindingMode.TwoWay);
- static TransitionAssist()
- {
- DisableTransitionsProperty.Changed.Subscribe(args =>
- {
+ static TransitionAssist() {
+ DisableTransitionsProperty.Changed.Subscribe(args => {
if (args.Sender is not StyledElement styledElement) return;
styledElement.Classes.Set("no-transitions", args.NewValue.Value);
diff --git a/Material.Styles/Controls/CircleClockPicker.axaml.cs b/Material.Styles/Controls/CircleClockPicker.axaml.cs
index 25b65818..bf89089c 100644
--- a/Material.Styles/Controls/CircleClockPicker.axaml.cs
+++ b/Material.Styles/Controls/CircleClockPicker.axaml.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Reactive.Disposables;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
@@ -32,6 +31,16 @@ public class CircleClockPicker : TemplatedControl {
public static readonly StyledProperty CellShiftNumberProperty =
AvaloniaProperty.Register(nameof(CellShiftNumber));
+ private readonly Dictionary _cachedAccessors = new();
+ private Panel? _cellPanel;
+
+ private bool _isDragging;
+ private Control? _pointer;
+ private Control? _pointerPin;
+
+ private int? _value;
+
+ static CircleClockPicker() { }
public int? Value {
get => _value;
@@ -73,14 +82,9 @@ public int CellShiftNumber {
public event EventHandler? AfterDrag;
- static CircleClockPicker() { }
-
protected override void OnApplyTemplate(TemplateAppliedEventArgs e) {
base.OnApplyTemplate(e);
- _subscription?.Dispose();
- _subscription = null;
-
var pointer = e.NameScope.Find("PART_Pointer");
var canvas = e.NameScope.Find