diff --git a/maui/samples/Sandbox/App.xaml.cs b/maui/samples/Sandbox/App.xaml.cs index 3929e12..7660fb0 100644 --- a/maui/samples/Sandbox/App.xaml.cs +++ b/maui/samples/Sandbox/App.xaml.cs @@ -9,7 +9,9 @@ public App() protected override Window CreateWindow(IActivationState? activationState) { - return new Window(new AppShell()); + AppWindow window = new AppWindow(); + window.Page = new AppShell(); + return window; } } } diff --git a/maui/samples/Sandbox/AppWindow.xaml b/maui/samples/Sandbox/AppWindow.xaml new file mode 100644 index 0000000..4db164a --- /dev/null +++ b/maui/samples/Sandbox/AppWindow.xaml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/maui/samples/Sandbox/AppWindow.xaml.cs b/maui/samples/Sandbox/AppWindow.xaml.cs new file mode 100644 index 0000000..6bcb269 --- /dev/null +++ b/maui/samples/Sandbox/AppWindow.xaml.cs @@ -0,0 +1,10 @@ +namespace Syncfusion.Maui.Samples.Sandbox +{ + public partial class AppWindow + { + public AppWindow() + { + InitializeComponent(); + } + } +} diff --git a/maui/src/SegmentedControl/Views/SegmentLayout.cs b/maui/src/SegmentedControl/Views/SegmentLayout.cs index 06608db..88e5e00 100644 --- a/maui/src/SegmentedControl/Views/SegmentLayout.cs +++ b/maui/src/SegmentedControl/Views/SegmentLayout.cs @@ -42,7 +42,12 @@ internal class SegmentLayout : SfView /// The providing information about the segment items. internal SegmentLayout(ISegmentItemInfo itemInfo) { -#if __IOS__ +#if __IOS__ || MACCATALYST + // Ignore the safe area on iOS and Mac Catalyst so the control is laid out using the + // full bounds provided by its parent. Without this on Mac Catalyst, the initial window + // (non–fullscreen) can report a smaller client area and the segmented control may appear + // shifted upward / clipped beneath the title bar until a subsequent resize or fullscreen + // transition triggers a proper re-measure. (See GitHub issue: SegmentedControl TitleBar layout on macOS.) this.IgnoreSafeArea = true; #endif FlowDirection = Microsoft.Maui.FlowDirection.LeftToRight;