diff --git a/src/SamplesApp/SamplesApp.UITests/Microsoft_UI_Xaml_Controls/SplitButtonTests/Given_SplitButton.cs b/src/SamplesApp/SamplesApp.UITests/Microsoft_UI_Xaml_Controls/SplitButtonTests/Given_SplitButton.cs
deleted file mode 100644
index 8f156601bc74..000000000000
--- a/src/SamplesApp/SamplesApp.UITests/Microsoft_UI_Xaml_Controls/SplitButtonTests/Given_SplitButton.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using System;
-using NUnit.Framework;
-using SamplesApp.UITests.TestFramework;
-using Uno.UITest.Helpers;
-using Uno.UITest.Helpers.Queries;
-
-namespace SamplesApp.UITests.Microsoft_UI_Xaml_Controls.SplitButtonTests
-{
- public partial class Given_SplitButton : SampleControlUITestBase
- {
- // TODO: Additional tests can be ported when #3165 is fixed
-
- [Test]
- [AutoRetry]
- public void CommandTest()
- {
- Run("UITests.Microsoft_UI_Xaml_Controls.SplitButtonTests.SplitButtonPage");
-
- var splitButton = new QueryEx(q => q.All().Marked("CommandSplitButton"));
-
- var canExecuteCheckBox = new QueryEx(q => q.All().Marked("CanExecuteCheckBox"));
- var executeCountTextBlock = new QueryEx(q => q.All().Marked("ExecuteCountTextBlock"));
-
- Console.WriteLine("Assert that the control starts out enabled");
- Assert.IsTrue("true".Equals(canExecuteCheckBox.GetDependencyPropertyValue("IsChecked").ToString(), StringComparison.InvariantCultureIgnoreCase));
- Assert.IsTrue("true".Equals(splitButton.GetDependencyPropertyValue("IsEnabled").ToString(), StringComparison.InvariantCultureIgnoreCase));
- Assert.AreEqual("0", executeCountTextBlock.GetText());
-
- Console.WriteLine("Click primary button to execute command");
- TapPrimaryButton(splitButton);
- Assert.AreEqual("1", executeCountTextBlock.GetText());
-
- Console.WriteLine("Assert that setting CanExecute to false disables the primary button");
- canExecuteCheckBox.FastTap();
-
- //Wait.ForIdle();
-
- TapPrimaryButton(splitButton);
- Assert.AreEqual("1", executeCountTextBlock.GetText());
- }
-
- public void TapPrimaryButton(QueryEx splitButton)
- {
- // This method taps the descendants and differs from MUX!
- Console.WriteLine("Tap primary button area");
-
- splitButton.Descendant().Marked("PrimaryButton").FastTap();
- //Wait.ForIdle();
- }
- }
-}
diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonPage.xaml b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonPage.xaml
deleted file mode 100644
index ddabbe71e1a4..000000000000
--- a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonPage.xaml
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Click count:
-
-
-
- Flyout opened:
-
-
-
- Flyout closed:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Toggle State:
-
-
-
- Toggle State on Click:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Execute Count:
-
-
-
-
-
-
-
-
-
-
diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonTestsPage.xaml b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonTestsPage.xaml
new file mode 100644
index 000000000000..ce67486b516a
--- /dev/null
+++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonTestsPage.xaml
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Click count:
+
+
+
+ Flyout opened:
+
+
+
+ Flyout closed:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Toggle State:
+
+
+
+ Toggle State on Click:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Execute Count:
+
+
+
+
+
+
+
+
+
+
diff --git a/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonTestsPage.xaml.cs b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonTestsPage.xaml.cs
new file mode 100644
index 000000000000..762d489120ea
--- /dev/null
+++ b/src/SamplesApp/UITests.Shared/Microsoft_UI_Xaml_Controls/SplitButtonTests/SplitButtonTestsPage.xaml.cs
@@ -0,0 +1,194 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Input;
+using Uno.UI.Samples.Controls;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+
+using SplitButton = Microsoft/* UWP don't rename */.UI.Xaml.Controls.SplitButton;
+#if HAS_UNO
+using SplitButtonTestHelper = Microsoft/* UWP don't rename */.UI.Private.Controls.SplitButtonTestHelper;
+#endif
+using ToggleSplitButton = Microsoft/* UWP don't rename */.UI.Xaml.Controls.ToggleSplitButton;
+using ToggleSplitButtonIsCheckedChangedEventArgs = Microsoft/* UWP don't rename */.UI.Xaml.Controls.ToggleSplitButtonIsCheckedChangedEventArgs;
+
+namespace UITests.Microsoft_UI_Xaml_Controls.SplitButtonTests
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ [Sample("MUX", "Buttons")]
+ public sealed partial class SplitButtonTestsPage : Page
+ {
+ private int _clickCount = 0;
+ private int _flyoutOpenedCount = 0;
+ private int _flyoutClosedCount = 0;
+
+ public MyCommand TestExecuteCommand;
+ private int _commandExecuteCount = 0;
+
+ private Flyout _placementFlyout;
+
+ public SplitButtonTestsPage()
+ {
+ this.InitializeComponent();
+#if HAS_UNO
+ SplitButtonTestHelper.SimulateTouch = false;
+#endif
+
+ TestExecuteCommand = new MyCommand(this);
+
+ _placementFlyout = new Flyout();
+ _placementFlyout.Placement = FlyoutPlacementMode.Bottom;
+ TextBlock textBlock = new TextBlock();
+ textBlock.Text = "Placement Flyout";
+ _placementFlyout.Content = textBlock;
+
+ OrdinaryControlStateViewer.ControlType = TestSplitButton.GetType();
+ OrdinaryControlStateViewer.States = new List
+ {
+ "Normal",
+ "FlyoutOpen",
+ "TouchPressed",
+ "PrimaryPointerOver",
+ "PrimaryPressed",
+ "SecondaryPointerOver",
+ "SecondaryPressed",
+ };
+
+ ToggleControlStateViewer.ControlType = TestSplitButton.GetType();
+ ToggleControlStateViewer.States = new List
+ {
+ "Checked",
+ "CheckedFlyoutOpen",
+ "CheckedTouchPressed",
+ "CheckedPrimaryPointerOver",
+ "CheckedPrimaryPressed",
+ "CheckedSecondaryPointerOver",
+ "CheckedSecondaryPressed",
+ };
+ }
+
+ private void TestSplitButton_Click(object sender, object e)
+ {
+ ClickCountTextBlock.Text = (++_clickCount).ToString();
+ }
+
+ private void TestSplitButtonFlyout_Opened(object sender, object e)
+ {
+ FlyoutOpenedCountTextBlock.Text = (++_flyoutOpenedCount).ToString();
+ }
+
+ private void TestSplitButtonFlyout_Closed(object sender, object e)
+ {
+ FlyoutClosedCountTextBlock.Text = (++_flyoutClosedCount).ToString();
+ }
+
+ private void SimulateTouchCheckBox_Checked(object sender, RoutedEventArgs e)
+ {
+#if HAS_UNO
+ SplitButtonTestHelper.SimulateTouch = true;
+#endif
+ }
+
+ private void SimulateTouchCheckBox_Unchecked(object sender, RoutedEventArgs e)
+ {
+#if HAS_UNO
+ SplitButtonTestHelper.SimulateTouch = false;
+#endif
+ }
+
+ private void EnableCheckBox_Checked(object sender, RoutedEventArgs e)
+ {
+ DisabledSplitButton.IsEnabled = true;
+ }
+
+ private void EnableCheckBox_Unchecked(object sender, RoutedEventArgs e)
+ {
+ DisabledSplitButton.IsEnabled = false;
+ }
+
+ private void CanExecuteCheckBox_Checked(object sender, RoutedEventArgs e)
+ {
+ if (TestExecuteCommand != null)
+ {
+ TestExecuteCommand.UpdateCanExecute(true);
+ }
+ }
+
+ private void CanExecuteCheckBox_Unchecked(object sender, RoutedEventArgs e)
+ {
+ if (TestExecuteCommand != null)
+ {
+ TestExecuteCommand.UpdateCanExecute(false);
+ }
+ }
+
+ public void CommandExecute()
+ {
+ ExecuteCountTextBlock.Text = (++_commandExecuteCount).ToString();
+ }
+
+ private void SetFlyoutCheckBox_Checked(object sender, RoutedEventArgs e)
+ {
+ if (FlyoutSetSplitButton != null)
+ {
+ FlyoutSetSplitButton.Flyout = _placementFlyout;
+ }
+ }
+
+ private void SetFlyoutCheckBox_Unchecked(object sender, RoutedEventArgs e)
+ {
+ if (FlyoutSetSplitButton != null)
+ {
+ FlyoutSetSplitButton.Flyout = null;
+ }
+ }
+
+ private void ToggleSplitButton_IsCheckedChanged(ToggleSplitButton sender, ToggleSplitButtonIsCheckedChangedEventArgs args)
+ {
+ ToggleStateTextBlock.Text = ToggleSplitButton.IsChecked ? "Checked" : "Unchecked";
+ }
+
+ private void ToggleSplitButton_Click(object sender, object e)
+ {
+ ToggleStateOnClickTextBlock.Text = ToggleSplitButton.IsChecked ? "Checked" : "Unchecked";
+ }
+ }
+
+ public class MyCommand : ICommand
+ {
+ public event EventHandler CanExecuteChanged;
+
+ private SplitButtonTestsPage _parentPage;
+ private bool _canExecute = true;
+
+ public MyCommand() { }
+
+ public MyCommand(SplitButtonTestsPage parentPage)
+ {
+ _parentPage = parentPage;
+ }
+
+ public void UpdateCanExecute(bool canExecute)
+ {
+ _canExecute = canExecute;
+ if (CanExecuteChanged != null)
+ {
+ EventArgs args = new EventArgs();
+ CanExecuteChanged(this, args);
+ }
+ }
+
+ public bool CanExecute(object o)
+ {
+ return _canExecute;
+ }
+
+ public void Execute(object o)
+ {
+ _parentPage.CommandExecute();
+ }
+ }
+}
diff --git a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems
index 7f8608d541ee..9d9eb333d6da 100644
--- a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems
+++ b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems
@@ -318,7 +318,7 @@
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
@@ -5478,8 +5478,8 @@
RefreshVisualizerPage.xaml
-
- SplitButtonPage.xaml
+
+ SplitButtonTestsPage.xaml
TabViewBasicPage.xaml
diff --git a/src/Uno.UI.FluentTheme.v2/Resources/Version2/PriorityDefault/SplitButton.xaml b/src/Uno.UI.FluentTheme.v2/Resources/Version2/PriorityDefault/SplitButton.xaml
index b85708664693..634e6346a451 100644
--- a/src/Uno.UI.FluentTheme.v2/Resources/Version2/PriorityDefault/SplitButton.xaml
+++ b/src/Uno.UI.FluentTheme.v2/Resources/Version2/PriorityDefault/SplitButton.xaml
@@ -56,277 +56,199 @@
-
-
+
-
+
-
+
-
+
+
+
-
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
-
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
-
+
+
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-