Fix NavigationPageHandler, StepperHandler, TimePickerHandler from decompiled
NavigationPageHandler: - Added LoadToolbarIcon() method for PNG/SVG toolbar icons - Added icon loading in MapToolbarItems() - Fixed OnVirtualViewPushed to set Title and handle null content - Fixed animation parameters to match decompiled StepperHandler: - Added MapIncrement() and MapIsEnabled() methods - Added dark theme color support in ConnectHandler TimePickerHandler: - Added dark theme color support in ConnectHandler SkiaPage: - Added Icon property to SkiaToolbarItem class Also added Svg.Skia package reference. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
using Microsoft.Maui.Handlers;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Platform;
|
||||
using SkiaSharp;
|
||||
|
||||
@@ -19,7 +20,9 @@ public partial class StepperHandler : ViewHandler<IStepper, SkiaStepper>
|
||||
[nameof(IStepper.Value)] = MapValue,
|
||||
[nameof(IStepper.Minimum)] = MapMinimum,
|
||||
[nameof(IStepper.Maximum)] = MapMaximum,
|
||||
["Increment"] = MapIncrement,
|
||||
[nameof(IView.Background)] = MapBackground,
|
||||
[nameof(IView.IsEnabled)] = MapIsEnabled,
|
||||
};
|
||||
|
||||
public static CommandMapper<IStepper, StepperHandler> CommandMapper =
|
||||
@@ -45,6 +48,17 @@ public partial class StepperHandler : ViewHandler<IStepper, SkiaStepper>
|
||||
{
|
||||
base.ConnectHandler(platformView);
|
||||
platformView.ValueChanged += OnValueChanged;
|
||||
|
||||
// Apply dark theme colors if needed
|
||||
if (Application.Current?.UserAppTheme == AppTheme.Dark)
|
||||
{
|
||||
platformView.ButtonBackgroundColor = new SKColor(66, 66, 66);
|
||||
platformView.ButtonPressedColor = new SKColor(97, 97, 97);
|
||||
platformView.ButtonDisabledColor = new SKColor(48, 48, 48);
|
||||
platformView.SymbolColor = new SKColor(224, 224, 224);
|
||||
platformView.SymbolDisabledColor = new SKColor(97, 97, 97);
|
||||
platformView.BorderColor = new SKColor(97, 97, 97);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void DisconnectHandler(SkiaStepper platformView)
|
||||
@@ -86,4 +100,20 @@ public partial class StepperHandler : ViewHandler<IStepper, SkiaStepper>
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapIncrement(StepperHandler handler, IStepper stepper)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
|
||||
if (stepper is Stepper stepperControl)
|
||||
{
|
||||
handler.PlatformView.Increment = stepperControl.Increment;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapIsEnabled(StepperHandler handler, IStepper stepper)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.IsEnabled = stepper.IsEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user