From 22caa4c540420863f3850646560f0dbcc8406788 Mon Sep 17 00:00:00 2001 From: Ieuan Walker Date: Tue, 19 Nov 2024 19:31:10 +0000 Subject: [PATCH] Add xmlns:control and x:DataType to various XAML files Added xmlns:control namespace to reference App.Controls or App.Controls.CustomSwitchExamples in multiple XAML files. Added x:DataType attribute to enable compile-time data binding checks and IntelliSense support. Reordered xmlns:stateButton namespace and added x:DataType in CustomButton.xaml. Added x:DataType to examples:IosSwitch elements and DataTrigger elements in IsBusyTestPage.xaml and IsEnabledTestPage.xaml. Added x:DataType to Grid element in CustomSwitch.xaml. --- Demo/App/Controls/CustomButton.xaml | 4 +++- .../CustomSwitchExamples/AndroidSwitch.xaml | 4 +++- .../Controls/CustomSwitchExamples/IosSwitch.xaml | 4 +++- .../CustomSwitchExamples/Other1Switch.xaml | 4 +++- .../CustomSwitchExamples/Other2Switch.xaml | 4 +++- .../CustomSwitchExamples/Other3Switch.xaml | 4 +++- .../CustomSwitchExamples/Other4Switch.xaml | 4 +++- .../CustomSwitchExamples/Other5Switch.xaml | 4 +++- .../CustomSwitchExamples/Theme1Switch.xaml | 4 +++- .../CustomSwitchExamples/Theme2Switch.xaml | 4 +++- Demo/App/Pages/IsBusyTestPage.xaml | 14 ++++++++++---- Demo/App/Pages/IsEnabledTestPage.xaml | 8 ++++++-- Scr/Switch/CustomSwitch.xaml | 4 +++- 13 files changed, 49 insertions(+), 17 deletions(-) diff --git a/Demo/App/Controls/CustomButton.xaml b/Demo/App/Controls/CustomButton.xaml index 297e22f..0eeefdc 100644 --- a/Demo/App/Controls/CustomButton.xaml +++ b/Demo/App/Controls/CustomButton.xaml @@ -2,7 +2,9 @@ + xmlns:control="clr-namespace:App.Controls" + xmlns:stateButton="clr-namespace:IeuanWalker.Maui.StateButton;assembly=IeuanWalker.Maui.StateButton" + x:DataType="control:CustomButton"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:AndroidSwitch"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:IosSwitch"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:Other1Switch"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:Other2Switch"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:Other3Switch"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:Other4Switch"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:Other5Switch"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:Theme1Switch"> + xmlns:control="clr-namespace:App.Controls.CustomSwitchExamples" + xmlns:switch="clr-namespace:IeuanWalker.Maui.Switch;assembly=IeuanWalker.Maui.Switch" + x:DataType="control:Theme2Switch"> - + - - + - diff --git a/Demo/App/Pages/IsEnabledTestPage.xaml b/Demo/App/Pages/IsEnabledTestPage.xaml index f72d2e5..f096202 100644 --- a/Demo/App/Pages/IsEnabledTestPage.xaml +++ b/Demo/App/Pages/IsEnabledTestPage.xaml @@ -19,8 +19,12 @@ - - + + diff --git a/Scr/Switch/CustomSwitch.xaml b/Scr/Switch/CustomSwitch.xaml index b584a30..9c695c5 100644 --- a/Scr/Switch/CustomSwitch.xaml +++ b/Scr/Switch/CustomSwitch.xaml @@ -4,7 +4,9 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:view="clr-namespace:IeuanWalker.Maui.Switch"> - +