Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Controls/src/Core/Controls.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@
</PropertyGroup>

<PropertyGroup Condition="!$(TargetFramework.StartsWith('netstandard'))">
<IsAotCompatible>true</IsAotCompatible>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>

<!-- This project implements generic WinRT interfaces which requires generated code using unsafe for trimming and AOT compatibility if passed across the WinRT ABI. -->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<Import Project="$(MauiSrcDirectory)MultiTargeting.targets" />
Expand Down
1 change: 1 addition & 0 deletions src/Controls/src/Xaml/Controls.Xaml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</PropertyGroup>

<PropertyGroup Condition="!$(TargetFramework.StartsWith('netstandard'))">
<IsAotCompatible>true</IsAotCompatible>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
Expand Down
1 change: 1 addition & 0 deletions src/Core/maps/src/Maps.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</PropertyGroup>

<PropertyGroup Condition="!$(TargetFramework.StartsWith('netstandard'))">
<IsAotCompatible>true</IsAotCompatible>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
Expand Down
4 changes: 4 additions & 0 deletions src/Core/src/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
</PropertyGroup>

<PropertyGroup Condition="!$(TargetFramework.StartsWith('netstandard'))">
<IsAotCompatible>true</IsAotCompatible>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>

<!-- This project implements generic WinRT interfaces which requires generated code using unsafe for trimming and AOT compatibility if passed across the WinRT ABI. -->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/ColorConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Maui.Platform
{
public sealed class ColorConverter : UI.Xaml.Data.IValueConverter
public sealed partial class ColorConverter : UI.Xaml.Data.IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/ContentPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Microsoft.Maui.Platform
{
public class ContentPanel : MauiPanel
public partial class ContentPanel : MauiPanel
{
readonly Path? _borderPath;
IBorderStroke? _borderStroke;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.Maui.Platform
{
class DefaultOrUserDataTemplateSelector : DataTemplateSelector
partial class DefaultOrUserDataTemplateSelector : DataTemplateSelector
{
public string? UserTemplateName { get; set; }
public string? DefaultTemplateName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.Maui.Platform
/// <summary>
/// Group of helper extension methods related to KeyboardAccelerators.
/// </summary>
public static class KeyboardAcceleratorExtensions
public static partial class KeyboardAcceleratorExtensions
{
/// <summary>
/// Updates the collection of KeyboardAccelerators used by a MenuFlyoutItemBase.
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/LayoutPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Microsoft.Maui.Platform
{
public class LayoutPanel : MauiPanel
public partial class LayoutPanel : MauiPanel
{
Canvas? _backgroundLayer;
public bool ClipsToBounds { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Platform/Windows/MauiButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Microsoft.Maui.Platform
{
public class MauiButton : Button
public partial class MauiButton : Button
{
public MauiButton()
{
Expand All @@ -25,7 +25,7 @@ protected override AutomationPeer OnCreateAutomationPeer()
}
}

internal class DefaultMauiButtonContent : MauiPanel
internal partial class DefaultMauiButtonContent : MauiPanel
{
readonly Image _image;
readonly TextBlock _textBlock;
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/MauiButtonAutomationPeer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Microsoft.Maui.Platform
{
public class MauiButtonAutomationPeer : ButtonAutomationPeer
public partial class MauiButtonAutomationPeer : ButtonAutomationPeer
{
public MauiButtonAutomationPeer(Button owner) : base(owner)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/MauiCancelButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Maui.Platform
{
public class MauiCancelButton : Button
public partial class MauiCancelButton : Button
{
TextBlock _cancelButtonGlyph;
Border _cancelButtonBackground;
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/MauiHybridWebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.Maui.Platform
#if !NETSTANDARD
[RequiresDynamicCode(HybridWebViewHandler.DynamicFeatures)]
#endif
public class MauiHybridWebView : WebView2, IHybridPlatformWebView
public partial class MauiHybridWebView : WebView2, IHybridPlatformWebView
{
private readonly WeakReference<HybridWebViewHandler> _handler;
internal Task<bool>? WebViewReadyTask { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/MauiPageControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Microsoft.Maui.Platform
{
public class MauiPageControl : ItemsControl
public partial class MauiPageControl : ItemsControl
{
IIndicatorView? _indicatorView;
const int DefaultPadding = 4;
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/MauiPasswordTextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Microsoft.Maui.Platform
{
// TODO: Replace this all with a real PasswordBox and not do this
// as we lose many default password box features.
public class MauiPasswordTextBox : TextBox
public partial class MauiPasswordTextBox : TextBox
{
const char ObfuscationCharacter = '●';

Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/MauiSlider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Microsoft.Maui.Platform
{
internal class MauiSlider : Slider
internal partial class MauiSlider : Slider
{
Thumb _thumb;
Style _originalThumbStyle;
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/MauiStepper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Microsoft.Maui.Platform
{
public class MauiStepper : Control
public partial class MauiStepper : Control
{
Button _plus;
Button _minus;
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/MauiWebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Microsoft.Maui.Platform
{
public class MauiWebView : WebView2, IWebViewDelegate
public partial class MauiWebView : WebView2, IWebViewDelegate
{
readonly WeakReference<WebViewHandler> _handler;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/PlatformTouchGraphicsView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Maui.Platform
{
public class PlatformTouchGraphicsView : UserControl
public partial class PlatformTouchGraphicsView : UserControl
{
IGraphicsView? _graphicsView;
readonly W2DGraphicsView _platformGraphicsView;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Platform/Windows/RootNavigationView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public RootNavigationView()

internal new MauiToolbar? Toolbar
{
get => base.Toolbar as MauiToolbar;
get => base.Toolbar as MauiToolbar;
set
{
if (base.Toolbar == value)
Expand Down Expand Up @@ -367,7 +367,7 @@ internal Maui.IView? FlyoutView
// We use a container because if we just assign our Flyout to the PaneFooter on the NavigationView
// The measure call passes in PositiveInfinity for the measurements which causes the layout system
// to crash. So we use this Panel to facilitate more constrained measuring values
class FlyoutPanel : Panel
partial class FlyoutPanel : Panel
{
public Maui.IView? FlyoutView { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/RootPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Microsoft.Maui.Platform
{
[Obsolete("Use Microsoft.Maui.Platform.ContentPanel")]
public class RootPanel : Panel
public partial class RootPanel : Panel
{
internal Func<double, double, Size>? CrossPlatformMeasure { get; set; }
internal Func<Rect, Size>? CrossPlatformArrange { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.Maui.Platform
{
public sealed class TextAlignmentToHorizontalAlignmentConverter : Microsoft.UI.Xaml.Data.IValueConverter
public sealed partial class TextAlignmentToHorizontalAlignmentConverter : Microsoft.UI.Xaml.Data.IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Windows/WindowRootViewContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Maui.Platform
{
internal class WindowRootViewContainer : Panel
internal partial class WindowRootViewContainer : Panel
{
FrameworkElement? _topPage;
UIElementCollection? _cachedChildren;
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/src/Graphics.Skia/Graphics.Skia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</PropertyGroup>

<PropertyGroup Condition="!$(TargetFramework.StartsWith('netstandard'))">
<IsAotCompatible>true</IsAotCompatible>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.Maui.Graphics.Skia.Views
/// <summary>
/// A SkiaSharp-based graphics view for Windows that can render <see cref="IDrawable"/> objects.
/// </summary>
public class SkiaGraphicsView : SKXamlCanvas
public partial class SkiaGraphicsView : SKXamlCanvas
{
private IDrawable _drawable;
private SkiaCanvas _canvas;
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/src/Graphics.Win2D/Graphics.Win2D.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</PropertyGroup>

<PropertyGroup>
<IsAotCompatible Condition="!$(TargetFramework.StartsWith('netstandard'))">true</IsAotCompatible>
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional logic for IsAotCompatible is inconsistent across project files. Graphics.csproj and Graphics.Skia.csproj place this property within a PropertyGroup that already has the netstandard condition, while Graphics.Win2D.csproj duplicates the condition on the property itself. For consistency, either move this property into the existing conditional PropertyGroup or apply the same pattern across all Graphics projects.

Copilot uses AI. Check for mistakes.
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
Expand Down
1 change: 1 addition & 0 deletions src/Graphics/src/Graphics/Graphics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</PropertyGroup>

<PropertyGroup Condition="!$(TargetFramework.StartsWith('netstandard'))">
<IsAotCompatible>true</IsAotCompatible>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<EnableAotAnalyzer>true</EnableAotAnalyzer>
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ namespace Microsoft.Maui.Graphics.Platform
/// A Windows platform view that can be used to host drawings.
/// </summary>
#if MAUI_GRAPHICS_WIN2D
public sealed class W2DGraphicsView
public sealed partial class W2DGraphicsView
#else
public class PlatformGraphicsView
public partial class PlatformGraphicsView
#endif
: UserControl
{
Expand Down
Loading