diff --git a/native/Avalonia.Native/src/OSX/window.mm b/native/Avalonia.Native/src/OSX/window.mm
index abfae3cf1e..f826df4da9 100644
--- a/native/Avalonia.Native/src/OSX/window.mm
+++ b/native/Avalonia.Native/src/OSX/window.mm
@@ -1107,7 +1107,11 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
_lastPixelSize.Width = (int)fsize.width;
_lastPixelSize.Height = (int)fsize.height;
[self updateRenderTarget];
- _parent->BaseEvents->ScalingChanged([_parent->Window backingScaleFactor]);
+
+ if(_parent != nullptr)
+ {
+ _parent->BaseEvents->ScalingChanged([_parent->Window backingScaleFactor]);
+ }
[super viewDidChangeBackingProperties];
}
@@ -1166,7 +1170,12 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
auto modifiers = [self getModifiers:[event modifierFlags]];
[self becomeFirstResponder];
- _parent->BaseEvents->RawMouseEvent(type, timestamp, modifiers, point, delta);
+
+ if(_parent != nullptr)
+ {
+ _parent->BaseEvents->RawMouseEvent(type, timestamp, modifiers, point, delta);
+ }
+
[super mouseMoved:event];
}
@@ -1290,7 +1299,10 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
auto timestamp = [event timestamp] * 1000;
auto modifiers = [self getModifiers:[event modifierFlags]];
- _lastKeyHandled = _parent->BaseEvents->RawKeyEvent(type, timestamp, modifiers, key);
+ if(_parent != nullptr)
+ {
+ _lastKeyHandled = _parent->BaseEvents->RawKeyEvent(type, timestamp, modifiers, key);
+ }
}
- (BOOL)performKeyEquivalent:(NSEvent *)event
@@ -1381,7 +1393,10 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
{
if(!_lastKeyHandled)
{
- _lastKeyHandled = _parent->BaseEvents->RawTextInputEvent(0, [string UTF8String]);
+ if(_parent != nullptr)
+ {
+ _lastKeyHandled = _parent->BaseEvents->RawTextInputEvent(0, [string UTF8String]);
+ }
}
}
@@ -1677,7 +1692,11 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
{
[self showWindowMenuWithAppMenu];
- _parent->BaseEvents->Activated();
+ if(_parent != nullptr)
+ {
+ _parent->BaseEvents->Activated();
+ }
+
[super becomeKeyWindow];
}
}
@@ -1794,8 +1813,12 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
- (void)windowDidMove:(NSNotification *)notification
{
AvnPoint position;
- _parent->GetPosition(&position);
- _parent->BaseEvents->PositionChanged(position);
+
+ if(_parent != nullptr)
+ {
+ _parent->GetPosition(&position);
+ _parent->BaseEvents->PositionChanged(position);
+ }
}
@end
diff --git a/samples/ControlCatalog/SideBar.xaml b/samples/ControlCatalog/SideBar.xaml
index 26d25a6266..1ee6bf7a29 100644
--- a/samples/ControlCatalog/SideBar.xaml
+++ b/samples/ControlCatalog/SideBar.xaml
@@ -67,6 +67,9 @@
+
diff --git a/src/Avalonia.Controls/TabItem.cs b/src/Avalonia.Controls/TabItem.cs
index 038ea225ce..6320443a13 100644
--- a/src/Avalonia.Controls/TabItem.cs
+++ b/src/Avalonia.Controls/TabItem.cs
@@ -26,6 +26,7 @@ namespace Avalonia.Controls
static TabItem()
{
SelectableMixin.Attach(IsSelectedProperty);
+ PressedMixin.Attach();
FocusableProperty.OverrideDefaultValue(typeof(TabItem), true);
DataContextProperty.Changed.AddClassHandler((x, e) => x.UpdateHeader(e));
}
diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml
index ae2218ddde..1ef9ed84c9 100644
--- a/src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml
+++ b/src/Avalonia.Themes.Fluent/Accents/FluentBaseDark.xaml
@@ -402,5 +402,74 @@
+
+
+ XamlAutoFontFamily
+ XamlAutoFontFamily
+ 24
+ 40
+ 14
+ -25
+ 12,0,12,0
+ 12,0,12,0
+ 12,14,0,13
+ 0
+ 0,6,0,0
+ 12,14,0,13
+ SemiLight
+ Bold
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml
index 9510875212..9a1ced3db8 100644
--- a/src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml
+++ b/src/Avalonia.Themes.Fluent/Accents/FluentBaseLight.xaml
@@ -404,5 +404,74 @@
+
+
+ XamlAutoFontFamily
+ XamlAutoFontFamily
+ 24
+ 40
+ 14
+ -25
+ 12,0,12,0
+ 12,0,12,0
+ 12,14,0,13
+ 0
+ 0,6,0,0
+ 12,14,0,13
+ SemiLight
+ Bold
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml
index 3851c52713..8014309b85 100644
--- a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml
+++ b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesDark.xaml
@@ -721,5 +721,73 @@
+
+ XamlAutoFontFamily
+ XamlAutoFontFamily
+ 24
+ 40
+ 14
+ -25
+ 12,0,12,0
+ 12,0,12,0
+ 12,14,0,13
+ 0
+ 0,6,0,0
+ 12,14,0,13
+ SemiLight
+ Bold
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml
index 1a37bb6c21..31704578d2 100644
--- a/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml
+++ b/src/Avalonia.Themes.Fluent/Accents/FluentControlResourcesLight.xaml
@@ -719,5 +719,73 @@
+
+ XamlAutoFontFamily
+ XamlAutoFontFamily
+ 24
+ 40
+ 14
+ -25
+ 12,0,12,0
+ 12,0,12,0
+ 12,14,0,13
+ 0
+ 0,6,0,0
+ 12,14,0,13
+ SemiLight
+ Bold
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent/TabControl.xaml b/src/Avalonia.Themes.Fluent/TabControl.xaml
index ed2e67df28..3cfdf60ae0 100644
--- a/src/Avalonia.Themes.Fluent/TabControl.xaml
+++ b/src/Avalonia.Themes.Fluent/TabControl.xaml
@@ -1,62 +1,61 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ ItemTemplate="{TemplateBinding ItemTemplate}"
+ DockPanel.Dock="{TemplateBinding TabStripPlacement}"/>
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent/TabItem.xaml b/src/Avalonia.Themes.Fluent/TabItem.xaml
index 92482a564c..694e86a184 100644
--- a/src/Avalonia.Themes.Fluent/TabItem.xaml
+++ b/src/Avalonia.Themes.Fluent/TabItem.xaml
@@ -1,45 +1,130 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ 48
+ 24
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent/TabStrip.xaml b/src/Avalonia.Themes.Fluent/TabStrip.xaml
index 29ca1e7c94..8b3c0a8310 100644
--- a/src/Avalonia.Themes.Fluent/TabStrip.xaml
+++ b/src/Avalonia.Themes.Fluent/TabStrip.xaml
@@ -1,11 +1,20 @@
+
+
+
+ Item 1
+ Item 2
+ Disabled
+
+
+
-
diff --git a/src/Avalonia.Themes.Fluent/TabStripItem.xaml b/src/Avalonia.Themes.Fluent/TabStripItem.xaml
index 28c4c68a3d..d45f705a40 100644
--- a/src/Avalonia.Themes.Fluent/TabStripItem.xaml
+++ b/src/Avalonia.Themes.Fluent/TabStripItem.xaml
@@ -1,23 +1,103 @@
-
+
+
+
+
+ Leaf
+ Arch
+
+
+
+
+ 48
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+