Files
maui-linux/Handlers/TabbedPageHandler.cs
Dave Friedel 2a4e35cd39 Fix compilation: restore clean RC1 codebase
- Restore clean BindableProperty.Create syntax from RC1 commit
- Remove decompiler artifacts with mangled delegate types
- Add Svg.Skia package reference for icon support
- Fix duplicate type definitions
- Library now compiles successfully (0 errors)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 07:43:44 -05:00

56 lines
1.7 KiB
C#

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Graphics;
using SkiaSharp;
namespace Microsoft.Maui.Platform.Linux.Handlers;
/// <summary>
/// Handler for TabbedPage on Linux using Skia rendering.
/// Maps ITabbedView interface to SkiaTabbedPage platform view.
/// </summary>
public partial class TabbedPageHandler : ViewHandler<ITabbedView, SkiaTabbedPage>
{
public static IPropertyMapper<ITabbedView, TabbedPageHandler> Mapper = new PropertyMapper<ITabbedView, TabbedPageHandler>(ViewHandler.ViewMapper)
{
};
public static CommandMapper<ITabbedView, TabbedPageHandler> CommandMapper = new(ViewHandler.ViewCommandMapper)
{
};
public TabbedPageHandler() : base(Mapper, CommandMapper)
{
}
public TabbedPageHandler(IPropertyMapper? mapper, CommandMapper? commandMapper = null)
: base(mapper ?? Mapper, commandMapper ?? CommandMapper)
{
}
protected override SkiaTabbedPage CreatePlatformView()
{
return new SkiaTabbedPage();
}
protected override void ConnectHandler(SkiaTabbedPage platformView)
{
base.ConnectHandler(platformView);
platformView.SelectedIndexChanged += OnSelectedIndexChanged;
}
protected override void DisconnectHandler(SkiaTabbedPage platformView)
{
platformView.SelectedIndexChanged -= OnSelectedIndexChanged;
platformView.ClearTabs();
base.DisconnectHandler(platformView);
}
private void OnSelectedIndexChanged(object? sender, EventArgs e)
{
// Notify the virtual view of selection change
}
}