diff --git a/packages/e2e-test-app/test/SwitchComponentTest.test.ts b/packages/e2e-test-app/test/SwitchComponentTest.test.ts new file mode 100644 index 00000000000..7c8761cc46c --- /dev/null +++ b/packages/e2e-test-app/test/SwitchComponentTest.test.ts @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * @format + */ + +import {dumpVisualTree} from '@react-native-windows/automation-commands'; +import {goToComponentExample} from './RNTesterNavigation'; + +beforeAll(async () => { + await goToComponentExample('Switch'); +}); + +describe('SwitchTests', () => { + test('Switches can be set to true/false, initial false', async () => { + const dump = await dumpVisualTree('on-off-initial-off'); + expect(dump).toMatchSnapshot(); + }); + + test('Switches can be set to true/false, initial true', async () => { + const dump = await dumpVisualTree('on-off-initial-on'); + expect(dump).toMatchSnapshot(); + }); + + test('Switches can be disabled, initial false', async () => { + const dump = await dumpVisualTree('disabled-initial-off'); + expect(dump).toMatchSnapshot(); + }); + + test('Switches can be disabled, initial true', async () => { + const dump = await dumpVisualTree('disabled-initial-on'); + expect(dump).toMatchSnapshot(); + }); + + test('Custom colors can be provided, initial false', async () => { + const dump = await dumpVisualTree('initial-false-switch'); + expect(dump).toMatchSnapshot(); + }); + + test('Custom colors can be provided, initial true', async () => { + const dump = await dumpVisualTree('initial-true-switch'); + expect(dump).toMatchSnapshot(); + }); + + test('Change events can be detected, event top', async () => { + const dump = await dumpVisualTree('event-switch-top'); + expect(dump).toMatchSnapshot(); + }); + + test('Change events can be detected, event bottom', async () => { + const dump = await dumpVisualTree('event-switch-bottom'); + expect(dump).toMatchSnapshot(); + }); + + test('Change events can be detected, event regression top', async () => { + const dump = await dumpVisualTree('event-switch-regression-top'); + expect(dump).toMatchSnapshot(); + }); + + test('Change events can be detected, events regression bottom', async () => { + const dump = await dumpVisualTree('event-switch-regression-bottom'); + expect(dump).toMatchSnapshot(); + }); + test('Controlled switch', async () => { + const dump = await dumpVisualTree('controlled-switch'); + expect(dump).toMatchSnapshot(); + }); +}); diff --git a/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap new file mode 100644 index 00000000000..05ab8b98f9f --- /dev/null +++ b/packages/e2e-test-app/test/__snapshots__/SwitchComponentTest.test.ts.snap @@ -0,0 +1,2498 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`SwitchTests Change events can be detected, event bottom 1`] = ` +Object { + "AutomationId": "event-switch-bottom", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 41, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Change events can be detected, event regression top 1`] = ` +Object { + "AutomationId": "event-switch-regression-top", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Change events can be detected, event top 1`] = ` +Object { + "AutomationId": "event-switch-top", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Change events can be detected, events regression bottom 1`] = ` +Object { + "AutomationId": "event-switch-regression-bottom", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 41, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Controlled switch 1`] = ` +Object { + "AutomationId": "controlled-switch", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Custom colors can be provided, initial false 1`] = ` +Object { + "AutomationId": "initial-false-switch", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FF0000FF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Custom colors can be provided, initial true 1`] = ` +Object { + "AutomationId": "initial-true-switch", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 41, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FF0000FF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Switches can be disabled, initial false 1`] = ` +Object { + "AutomationId": "disabled-initial-off", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#0000003F", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#5C000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#5C000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Switches can be disabled, initial true 1`] = ` +Object { + "AutomationId": "disabled-initial-on", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#0000003F", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#5C000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#5C000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Switches can be set to true/false, initial false 1`] = ` +Object { + "AutomationId": "on-off-initial-off", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`; + +exports[`SwitchTests Switches can be set to true/false, initial true 1`] = ` +Object { + "AutomationId": "on-off-initial-on", + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "Height": 31, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "Width": 51, + "XamlType": "Windows.UI.Xaml.Controls.ToggleSwitch", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Top", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#00FFFFFF", + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,5,0,5", + "Name": "SwitchAreaGrid", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Grid", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OffContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OnContentPresenter", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Center", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.ContentPresenter", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "OuterBorder", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnobBounds", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 40, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + Object { + "Background": null, + "BorderBrush": null, + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Height": 20, + "HorizontalAlignment": "Left", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchKnob", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 20, + "XamlType": "Windows.UI.Xaml.Controls.Grid", + "children": Array [ + Object { + "Background": "#FFFFFFFF", + "BorderBrush": "Windows.UI.Xaml.Media.LinearGradientBrush", + "BorderThickness": "0,0,0,0", + "Clip": null, + "CornerRadius": "7,7,7,7", + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "0,0,1,0", + "Name": "SwitchKnobOn", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Controls.Border", + }, + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "Height": 12, + "HorizontalAlignment": "Center", + "Left": 0, + "Margin": "-1,0,0,0", + "Name": "SwitchKnobOff", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "Width": 12, + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + Object { + "Background": "#33000000", + "BorderBrush": "#00FFFFFF", + "BorderThickness": "1,1,1,1", + "Clip": null, + "CornerRadius": "0,0,0,0", + "FlowDirection": "LeftToRight", + "Foreground": "#E4000000", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Name": "SwitchThumb", + "Padding": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Controls.Primitives.Thumb", + "children": Array [ + Object { + "Clip": null, + "FlowDirection": "LeftToRight", + "HorizontalAlignment": "Stretch", + "Left": 0, + "Margin": "0,0,0,0", + "Top": 0, + "VerticalAlignment": "Stretch", + "Visibility": "Visible", + "XamlType": "Windows.UI.Xaml.Shapes.Rectangle", + }, + ], + }, + ], + }, + ], + }, + ], +} +`;