diff --git a/9.0/Animations/Animations/Pages/EasingEditorPage.xaml b/9.0/Animations/Animations/Pages/EasingEditorPage.xaml
index 668e4d6ce..903d5ce79 100644
--- a/9.0/Animations/Animations/Pages/EasingEditorPage.xaml
+++ b/9.0/Animations/Animations/Pages/EasingEditorPage.xaml
@@ -4,8 +4,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:controls="clr-namespace:Animations.Controls"
+ xmlns:local="clr-namespace:Animations"
Title="{Binding Card.CardTitle}"
- x:Class="Animations.EasingEditorPage">
+ x:Class="Animations.EasingEditorPage"
+ x:DataType="local:EasingEditorPage">
-
+
+
-
-
+ Title="Bug Sweeper">
+
+
+ HorizontalTextAlignment="Center" />
+ HorizontalTextAlignment="Center" />
+ HorizontalTextAlignment="Center" />
+ BindingContext="{x:Reference board}" />
+
+
+
-
-
-
+ HorizontalTextAlignment="Center" />
+
+
+
-
+ SizeChanged="OnBoardGridSizeChanged">
+
+ HorizontalOptions="Center">
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
-
+ TextColor="Red" />
+
+ HorizontalOptions="Center">
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
+ TextColor="Red" />
-
+ TextColor="Red" />
+
-
-
-
+ TextColor="Black" />
+
+
+
diff --git a/9.0/Apps/BugSweeper/BugSweeper/Tile.cs b/9.0/Apps/BugSweeper/BugSweeper/Tile.cs
index ae4e0917d..1a1f4361e 100644
--- a/9.0/Apps/BugSweeper/BugSweeper/Tile.cs
+++ b/9.0/Apps/BugSweeper/BugSweeper/Tile.cs
@@ -1,127 +1,127 @@
-using Microsoft.Maui.Controls.Shapes;
-
-namespace BugSweeper
-{
- enum TileStatus
- {
- Hidden,
- Flagged,
- Exposed
- }
-
- class Tile : Border
- {
- TileStatus tileStatus = TileStatus.Hidden;
- Label label;
- Image flagImage, bugImage;
+using Microsoft.Maui.Controls.Shapes;
+
+namespace BugSweeper
+{
+ enum TileStatus
+ {
+ Hidden,
+ Flagged,
+ Exposed
+ }
+
+ class Tile : Border
+ {
+ TileStatus tileStatus = TileStatus.Hidden;
+ Label label;
+ Image flagImage, bugImage;
bool doNotFireEvent;
-#if WINDOWS
- bool lastTapSingle;
- DateTime lastTapTime;
-#endif
-
- public event EventHandler TileStatusChanged;
-
- public int Row { get; private set; }
- public int Col { get; private set; }
- public bool IsBug { get; set; }
- public int SurroundingBugCount { get; set; }
-
- public TileStatus Status
- {
- get => tileStatus;
- set
- {
- if (tileStatus != value)
- {
- tileStatus = value;
-
- switch (tileStatus)
- {
- case TileStatus.Hidden:
- this.Content = null;
- break;
-
- case TileStatus.Flagged:
- this.Content = flagImage;
- break;
-
- case TileStatus.Exposed:
- if (this.IsBug)
- this.Content = bugImage;
- else
- {
- this.Content = label;
- label.Text = (this.SurroundingBugCount > 0) ? this.SurroundingBugCount.ToString() : " ";
- }
- break;
- }
-
- if (!doNotFireEvent && TileStatusChanged != null)
- TileStatusChanged(this, tileStatus);
- }
- }
- }
-
- public Tile(int row, int col)
- {
- this.Row = row;
- this.Col = col;
-
- this.BackgroundColor = Color.FromArgb("#512BD4");
- this.Stroke = Colors.Black;
- this.StrokeThickness = 2;
- this.StrokeShape = new RoundRectangle
- {
- CornerRadius = 4
- };
- this.Padding = 2;
-
- label = new Label
- {
- Text = " ",
- TextColor = Colors.Black,
- BackgroundColor = Colors.Gold,
- FontSize = 24,
- HorizontalTextAlignment = TextAlignment.Center,
- VerticalTextAlignment = TextAlignment.Center,
- };
-
- flagImage = new Image { Source = ImageSource.FromFile("dotnet_logo.png") };
- bugImage = new Image { Source = ImageSource.FromFile("redbug.png") };
-
- TapGestureRecognizer singleTap = new TapGestureRecognizer
- {
- NumberOfTapsRequired = 1
- };
- singleTap.Tapped += OnSingleTap;
+#if WINDOWS
+ bool lastTapSingle;
+ DateTime lastTapTime;
+#endif
+
+ public event EventHandler TileStatusChanged;
+
+ public int Row { get; private set; }
+ public int Col { get; private set; }
+ public bool IsBug { get; set; }
+ public int SurroundingBugCount { get; set; }
+
+ public TileStatus Status
+ {
+ get => tileStatus;
+ set
+ {
+ if (tileStatus != value)
+ {
+ tileStatus = value;
+
+ switch (tileStatus)
+ {
+ case TileStatus.Hidden:
+ this.Content = null;
+ break;
+
+ case TileStatus.Flagged:
+ this.Content = flagImage;
+ break;
+
+ case TileStatus.Exposed:
+ if (this.IsBug)
+ this.Content = bugImage;
+ else
+ {
+ this.Content = label;
+ label.Text = (this.SurroundingBugCount > 0) ? this.SurroundingBugCount.ToString() : " ";
+ }
+ break;
+ }
+
+ if (!doNotFireEvent && TileStatusChanged != null)
+ TileStatusChanged(this, tileStatus);
+ }
+ }
+ }
+
+ public Tile(int row, int col)
+ {
+ this.Row = row;
+ this.Col = col;
+
+ this.BackgroundColor = Color.FromArgb("#512BD4");
+ this.Stroke = Colors.Black;
+ this.StrokeThickness = 2;
+ this.StrokeShape = new RoundRectangle
+ {
+ CornerRadius = 4
+ };
+ this.Padding = 2;
+
+ label = new Label
+ {
+ Text = " ",
+ TextColor = Colors.Black,
+ BackgroundColor = Colors.Gold,
+ FontSize = 24,
+ HorizontalTextAlignment = TextAlignment.Center,
+ VerticalTextAlignment = TextAlignment.Center,
+ };
+
+ flagImage = new Image { Source = ImageSource.FromFile("dotnet_logo.png") };
+ bugImage = new Image { Source = ImageSource.FromFile("redbug.png") };
+
+ TapGestureRecognizer singleTap = new TapGestureRecognizer
+ {
+ NumberOfTapsRequired = 1
+ };
+ singleTap.Tapped += OnSingleTap;
this.GestureRecognizers.Add(singleTap);
#if ANDROID || IOS || MACCATALYST
- TapGestureRecognizer doubleTap = new TapGestureRecognizer
- {
- NumberOfTapsRequired = 2
- };
- doubleTap.Tapped += OnDoubleTap;
+ TapGestureRecognizer doubleTap = new TapGestureRecognizer
+ {
+ NumberOfTapsRequired = 2
+ };
+ doubleTap.Tapped += OnDoubleTap;
this.GestureRecognizers.Add(doubleTap);
-#endif
- }
-
- // Does not fire TileStatusChanged events.
- public void Initialize()
- {
- doNotFireEvent = true;
- this.Status = TileStatus.Hidden;
- this.IsBug = false;
- this.SurroundingBugCount = 0;
- doNotFireEvent = false;
- }
-
- void OnSingleTap(object sender, object args)
+#endif
+ }
+
+ // Does not fire TileStatusChanged events.
+ public void Initialize()
{
-#if WINDOWS
- // Simulate double tap on Windows
+ doNotFireEvent = true;
+ this.Status = TileStatus.Hidden;
+ this.IsBug = false;
+ this.SurroundingBugCount = 0;
+ doNotFireEvent = false;
+ }
+
+ void OnSingleTap(object sender, object args)
+ {
+#if WINDOWS
+ // Simulate double tap on Windows
if (lastTapSingle && DateTime.Now - lastTapTime < TimeSpan.FromMilliseconds(500))
{
OnDoubleTap(sender, args);
@@ -132,26 +132,26 @@ void OnSingleTap(object sender, object args)
lastTapTime = DateTime.Now;
lastTapSingle = true;
}
-#endif
- switch (this.Status)
- {
- case TileStatus.Hidden:
- this.Status = TileStatus.Flagged;
- break;
-
- case TileStatus.Flagged:
- this.Status = TileStatus.Hidden;
- break;
-
- case TileStatus.Exposed:
- // Do nothing
- break;
- }
- }
-
- void OnDoubleTap(object sender, object args)
- {
- this.Status = TileStatus.Exposed;
- }
- }
-}
+#endif
+ switch (this.Status)
+ {
+ case TileStatus.Hidden:
+ this.Status = TileStatus.Flagged;
+ break;
+
+ case TileStatus.Flagged:
+ this.Status = TileStatus.Hidden;
+ break;
+
+ case TileStatus.Exposed:
+ // Do nothing
+ break;
+ }
+ }
+
+ void OnDoubleTap(object sender, object args)
+ {
+ this.Status = TileStatus.Exposed;
+ }
+ }
+}
diff --git a/9.0/Apps/GameOfLife/GameOfLife/App.xaml.cs b/9.0/Apps/GameOfLife/GameOfLife/App.xaml.cs
index 6187e8f31..4ae5ea2f5 100644
--- a/9.0/Apps/GameOfLife/GameOfLife/App.xaml.cs
+++ b/9.0/Apps/GameOfLife/GameOfLife/App.xaml.cs
@@ -7,7 +7,7 @@ public App()
InitializeComponent();
}
- protected override Window CreateWindow(IActivationState activationState)
+ protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new AppShell());
}
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/AppShell.xaml b/9.0/Apps/PointOfSale/src/PointOfSale/AppShell.xaml
index 49fba37d0..dc3d903d5 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/AppShell.xaml
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/AppShell.xaml
@@ -1,6 +1,7 @@
-
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/EmptyPage.xaml b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/EmptyPage.xaml
index 505b32095..c8a02ecff 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/EmptyPage.xaml
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/EmptyPage.xaml
@@ -15,7 +15,7 @@
-
+
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/MobileLoginPage.xaml.cs b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/MobileLoginPage.xaml.cs
index 4af19965e..c79788d89 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/MobileLoginPage.xaml.cs
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/MobileLoginPage.xaml.cs
@@ -9,7 +9,7 @@ public MobileLoginPage()
InitializeComponent();
}
- protected override async void OnNavigatedTo(NavigatedToEventArgs args)
+ protected override void OnNavigatedTo(NavigatedToEventArgs args)
{
base.OnNavigatedTo(args);
}
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/OrdersPage.xaml b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/OrdersPage.xaml
index 8ef59e50f..b2d5ca8e4 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/OrdersPage.xaml
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/OrdersPage.xaml
@@ -18,7 +18,7 @@
-
+
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/ReceiptPage.xaml b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/ReceiptPage.xaml
index d710a1590..cf2a7521c 100755
--- a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/ReceiptPage.xaml
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/ReceiptPage.xaml
@@ -4,7 +4,8 @@
xmlns:models="clr-namespace:PointOfSale.Models"
xmlns:handheld="clr-namespace:PointOfSale.Pages.Handheld"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
- xmlns:views="clr-namespace:PointOfSale.Pages.Views" xmlns:converters="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
+ xmlns:views="clr-namespace:PointOfSale.Pages.Views"
+ xmlns:converters="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="PointOfSale.Pages.Handheld.ReceiptPage"
Shell.NavBarIsVisible="False"
x:DataType="handheld:ReceiptViewModel"
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/HomePage.xaml b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/HomePage.xaml
index 01707a20e..a2c93054c 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/HomePage.xaml
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/HomePage.xaml
@@ -185,7 +185,7 @@
-
+
@@ -249,7 +249,7 @@
-
+
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Views/AddProductView.xaml b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Views/AddProductView.xaml
index f55f772df..37362f90b 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Views/AddProductView.xaml
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Views/AddProductView.xaml
@@ -82,7 +82,7 @@
-
+
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Views/FlyoutButtonView.xaml b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Views/FlyoutButtonView.xaml
index 512f2eb60..01f6284b3 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Views/FlyoutButtonView.xaml
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/Pages/Views/FlyoutButtonView.xaml
@@ -1,6 +1,7 @@
@@ -86,7 +87,7 @@
-
+
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj b/9.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj
index 93b992f73..fa9c80d40 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/PointOfSale.csproj
@@ -16,6 +16,7 @@
true
true
enable
+ true
Point of Sale
@@ -67,7 +68,7 @@
-
+
diff --git a/9.0/Apps/PointOfSale/src/PointOfSale/Resources/Styles/ControlTemplates.xaml b/9.0/Apps/PointOfSale/src/PointOfSale/Resources/Styles/ControlTemplates.xaml
index 4884bed72..62577cc2a 100644
--- a/9.0/Apps/PointOfSale/src/PointOfSale/Resources/Styles/ControlTemplates.xaml
+++ b/9.0/Apps/PointOfSale/src/PointOfSale/Resources/Styles/ControlTemplates.xaml
@@ -83,10 +83,11 @@
-
+
diff --git a/9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/App.xaml b/9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/App.xaml
index 922800f88..aaf565afe 100644
--- a/9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/App.xaml
+++ b/9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/App.xaml
@@ -65,7 +65,7 @@
-
+
+ x:Class="WeatherTwentyOne.Pages.FavoritesPage"
+ x:DataType="vm:FavoritesViewModel">
+ x:Name="this"
+ x:DataType="vm:HomeViewModel">
diff --git a/9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/Pages/SettingsPage.xaml b/9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/Pages/SettingsPage.xaml
index e719ead1c..7cba618e0 100644
--- a/9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/Pages/SettingsPage.xaml
+++ b/9.0/Apps/WeatherTwentyOne/src/WeatherTwentyOne/Pages/SettingsPage.xaml
@@ -3,11 +3,13 @@
xmlns:local="clr-namespace:WeatherTwentyOne.Resources.Styles"
xmlns:am="clr-namespace:Microsoft.Maui.ApplicationModel;assembly=Microsoft.Maui.Essentials"
xmlns:v="clr-namespace:WeatherTwentyOne.Views"
+ xmlns:vm="clr-namespace:WeatherTwentyOne.ViewModels"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
ios:Page.UseSafeArea="True"
Title="Settings"
Shell.NavBarIsVisible="{OnIdiom True, Desktop=False}"
- x:Class="WeatherTwentyOne.Pages.SettingsPage">
+ x:Class="WeatherTwentyOne.Pages.SettingsPage"
+ x:DataType="vm:SettingsViewModel">
@@ -192,8 +194,7 @@
+ RadioButtonGroup.GroupName="AppTheme">
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/9.0/Fundamentals/ControlTemplateDemos/ControlTemplateDemos/Views/MainPage.xaml b/9.0/Fundamentals/ControlTemplateDemos/ControlTemplateDemos/Views/MainPage.xaml
index d8fd7b417..1f91d7870 100644
--- a/9.0/Fundamentals/ControlTemplateDemos/ControlTemplateDemos/Views/MainPage.xaml
+++ b/9.0/Fundamentals/ControlTemplateDemos/ControlTemplateDemos/Views/MainPage.xaml
@@ -3,7 +3,8 @@
xmlns:local="clr-namespace:ControlTemplateDemos"
x:Class="ControlTemplateDemos.MainPage"
Padding="10"
- Title="ControlTemplate demos">
+ Title="ControlTemplate demos"
+ x:DataType="local:MainPage">
diff --git a/9.0/Fundamentals/ControlTemplateDemos/ControlTemplateDemos/Views/RelativeSourceBindingCardViewPage.xaml b/9.0/Fundamentals/ControlTemplateDemos/ControlTemplateDemos/Views/RelativeSourceBindingCardViewPage.xaml
index 77260a519..b0ac92bb9 100644
--- a/9.0/Fundamentals/ControlTemplateDemos/ControlTemplateDemos/Views/RelativeSourceBindingCardViewPage.xaml
+++ b/9.0/Fundamentals/ControlTemplateDemos/ControlTemplateDemos/Views/RelativeSourceBindingCardViewPage.xaml
@@ -5,7 +5,8 @@
x:Class="ControlTemplateDemos.RelativeSourceBindingCardViewPage"
Title="RelativeSource CardView">
-
+
@@ -59,25 +60,28 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/DataBindingDemos.csproj b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/DataBindingDemos.csproj
index 135f0650f..50a2ff830 100644
--- a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/DataBindingDemos.csproj
+++ b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/DataBindingDemos.csproj
@@ -18,6 +18,7 @@
true
true
enable
+ true
DataBindingDemos
diff --git a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/NamedColor.cs b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/NamedColor.cs
index 0bc10b248..c39e1fc85 100644
--- a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/NamedColor.cs
+++ b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/NamedColor.cs
@@ -5,13 +5,13 @@ namespace DataBindingDemos
{
public class NamedColor : IEquatable, IComparable
{
- public string Name { private set; get; }
+ public string Name { get; private set; }
- public string FriendlyName { private set; get; }
+ public string FriendlyName { get; private set; }
- public Color Color { private set; get; }
+ public Color Color { get; private set; }
- public string RgbDisplay { private set; get; }
+ public string RgbDisplay { get; private set; }
public bool Equals(NamedColor other)
{
@@ -74,7 +74,7 @@ static NamedColor()
All = all;
}
- public static IList All { private set; get; }
+ public static IList All { get; private set; }
public static NamedColor Find(string name)
{
diff --git a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/ViewModels/MonkeysViewModel.cs b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/ViewModels/MonkeysViewModel.cs
index 87492e133..feb747d57 100644
--- a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/ViewModels/MonkeysViewModel.cs
+++ b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/ViewModels/MonkeysViewModel.cs
@@ -1,6 +1,4 @@
-using System.Collections.Generic;
-
-namespace DataBindingDemos
+namespace DataBindingDemos
{
public class MonkeysViewModel
{
diff --git a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/ViewModels/PersonViewModel.cs b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/ViewModels/PersonViewModel.cs
index ea1a1b4c8..352d75d1b 100644
--- a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/ViewModels/PersonViewModel.cs
+++ b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/ViewModels/PersonViewModel.cs
@@ -1,5 +1,4 @@
-using System;
-using System.ComponentModel;
+using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace DataBindingDemos
diff --git a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/Views/AlternativeXamlBindingPage.xaml b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/Views/AlternativeXamlBindingPage.xaml
index 5771c6fef..84042cbab 100644
--- a/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/Views/AlternativeXamlBindingPage.xaml
+++ b/9.0/Fundamentals/DataBindingDemos/DataBindingDemos/Views/AlternativeXamlBindingPage.xaml
@@ -4,7 +4,8 @@
x:Class="DataBindingDemos.AlternativeXamlBindingPage"
Title="Alternative XAML Binding">
-