diff --git a/.vscode/settings.json b/.vscode/settings.json index 45b1618d..444dd1ee 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { - "omnisharp.defaultLaunchSolution": "CommunityToolkit.AllComponents.sln", "omnisharp.disableMSBuildDiagnosticWarning": true, "omnisharp.enableRoslynAnalyzers": true, "omnisharp.useGlobalMono": "never", @@ -8,5 +7,6 @@ "csharp.suppressDotnetRestoreNotification": true, "csharp.semanticHighlighting.enabled": true, "omnisharp.enableMsBuildLoadProjectsOnDemand": true, - "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true + "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true, + "dotnet.defaultSolution": "CommunityToolkit.AllComponents.sln" } \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 51c3f6dd..88d43606 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -26,7 +26,7 @@ true $(NoWarn);Uno0001 - $(NoWarn);TKSMPL0014 + $(NoWarn);TKSMPL0014; diff --git a/components/Animations/src/Xaml/AnimationScope.cs b/components/Animations/src/Xaml/AnimationScope.cs index cf7d40ba..d4e9a115 100644 --- a/components/Animations/src/Xaml/AnimationScope.cs +++ b/components/Animations/src/Xaml/AnimationScope.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI.Animations; /// A container of elements that can be used to conceptually group animations /// together and to assign shared properties to be applied to all the contained items automatically. /// -public sealed class AnimationScope : DependencyObjectCollection, ITimeline +public sealed partial class AnimationScope : DependencyObjectCollection, ITimeline { /// /// Gets or sets the optional initial delay for the animation. diff --git a/components/Animations/src/Xaml/AnimationSet.cs b/components/Animations/src/Xaml/AnimationSet.cs index 1c717ca2..f49c837d 100644 --- a/components/Animations/src/Xaml/AnimationSet.cs +++ b/components/Animations/src/Xaml/AnimationSet.cs @@ -17,7 +17,7 @@ namespace CommunityToolkit.WinUI.Animations; /// A collection of animations that can be grouped together. This type represents a composite animation /// (such as ) that can be executed on a given element. /// -public sealed class AnimationSet : DependencyObjectCollection +public sealed partial class AnimationSet : DependencyObjectCollection { /// /// A conditional weak table storing instances associated with animations diff --git a/components/Animations/src/Xaml/ImplicitAnimationSet.cs b/components/Animations/src/Xaml/ImplicitAnimationSet.cs index 259ab72c..412a0771 100644 --- a/components/Animations/src/Xaml/ImplicitAnimationSet.cs +++ b/components/Animations/src/Xaml/ImplicitAnimationSet.cs @@ -36,7 +36,7 @@ namespace CommunityToolkit.WinUI.Animations; /// one to another, and doing so will add unnecessary runtime overhead over time. If you want to apply the same animations /// to multiple elements, simply create another instance and another set of animations with the same properties within it. /// -public sealed class ImplicitAnimationSet : DependencyObjectCollection +public sealed partial class ImplicitAnimationSet : DependencyObjectCollection { /// /// Raised whenever any configuration change occurrs within the current instance. diff --git a/components/Collections/src/AdvancedCollectionView/VectorChangedEventArgs.cs b/components/Collections/src/AdvancedCollectionView/VectorChangedEventArgs.cs index 0e5be060..0b6733aa 100644 --- a/components/Collections/src/AdvancedCollectionView/VectorChangedEventArgs.cs +++ b/components/Collections/src/AdvancedCollectionView/VectorChangedEventArgs.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Collections; /// /// Vector changed EventArgs /// -internal class VectorChangedEventArgs : IVectorChangedEventArgs +internal partial class VectorChangedEventArgs : IVectorChangedEventArgs { /// /// Initializes a new instance of the class. diff --git a/components/ColorPicker/src/Converters/AccentColorConverter.cs b/components/ColorPicker/src/Converters/AccentColorConverter.cs index 502cfc71..2c3204fd 100644 --- a/components/ColorPicker/src/Converters/AccentColorConverter.cs +++ b/components/ColorPicker/src/Converters/AccentColorConverter.cs @@ -11,7 +11,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// Creates an accent color for a base color value. /// -public class AccentColorConverter : IValueConverter +public partial class AccentColorConverter : IValueConverter { /// /// The amount to change the Value channel for each accent color step. diff --git a/components/ColorPicker/src/Converters/ColorToHexConverter.cs b/components/ColorPicker/src/Converters/ColorToHexConverter.cs index db6eec76..5eadf247 100644 --- a/components/ColorPicker/src/Converters/ColorToHexConverter.cs +++ b/components/ColorPicker/src/Converters/ColorToHexConverter.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// Converts a color to a hex string and vice versa. /// -public class ColorToHexConverter : IValueConverter +public partial class ColorToHexConverter : IValueConverter { /// public object Convert( diff --git a/components/ColorPicker/src/Converters/ContrastBrushConverter.cs b/components/ColorPicker/src/Converters/ContrastBrushConverter.cs index faf4a117..6b73c88f 100644 --- a/components/ColorPicker/src/Converters/ContrastBrushConverter.cs +++ b/components/ColorPicker/src/Converters/ContrastBrushConverter.cs @@ -15,7 +15,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// Gets a color, either black or white, depending on the brightness of the supplied color. /// -public class ContrastBrushConverter : IValueConverter +public partial class ContrastBrushConverter : IValueConverter { /// /// Gets or sets the alpha channel threshold below which a default color is used instead of black/white. diff --git a/components/Converters/src/BoolNegationConverter.cs b/components/Converters/src/BoolNegationConverter.cs index 3eeb1fd5..164d8cbf 100644 --- a/components/Converters/src/BoolNegationConverter.cs +++ b/components/Converters/src/BoolNegationConverter.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// Value converter that applies NOT operator to a value. /// -public class BoolNegationConverter : IValueConverter +public partial class BoolNegationConverter : IValueConverter { /// /// Convert a boolean value to its negation. diff --git a/components/Converters/src/BoolToVisibilityConverter.cs b/components/Converters/src/BoolToVisibilityConverter.cs index deb1fa65..25c19fd7 100644 --- a/components/Converters/src/BoolToVisibilityConverter.cs +++ b/components/Converters/src/BoolToVisibilityConverter.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// This class converts a boolean value into a Visibility enumeration. /// -public class BoolToVisibilityConverter : BoolToObjectConverter +public partial class BoolToVisibilityConverter : BoolToObjectConverter { /// /// Initializes a new instance of the class. diff --git a/components/Converters/src/CollectionVisibilityConverter.cs b/components/Converters/src/CollectionVisibilityConverter.cs index a626ebc7..c322d396 100644 --- a/components/Converters/src/CollectionVisibilityConverter.cs +++ b/components/Converters/src/CollectionVisibilityConverter.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// This class converts a collection size to visibility. /// -public class CollectionVisibilityConverter : EmptyCollectionToObjectConverter +public partial class CollectionVisibilityConverter : EmptyCollectionToObjectConverter { /// /// Initializes a new instance of the class. diff --git a/components/Converters/src/ColorToDisplayNameConverter.cs b/components/Converters/src/ColorToDisplayNameConverter.cs index bc5a83f2..6a22ff67 100644 --- a/components/Converters/src/ColorToDisplayNameConverter.cs +++ b/components/Converters/src/ColorToDisplayNameConverter.cs @@ -9,7 +9,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// Gets the approximated display name for the color. /// -public class ColorToDisplayNameConverter : IValueConverter +public partial class ColorToDisplayNameConverter : IValueConverter { /// public object Convert( @@ -33,12 +33,14 @@ public object Convert( // Invalid color value provided return DependencyProperty.UnsetValue; } - -#if !WINAPPSDK && !HAS_UNO - return Windows.UI.ColorHelper.ToDisplayName(color); -#else - // ToDisplayName not yet supported on WASDK. See https://github.com/microsoft/microsoft-ui-xaml/issues/8287 +#if HAS_UNO + // ColorHelper.ToDisplayName not yet supported on Uno Platform. + // Track https://github.com/unoplatform/uno/issues/18004 return "Not supported"; +#elif WINUI2 + return Windows.UI.ColorHelper.ToDisplayName(color); +#elif WINUI3 + return Microsoft.UI.ColorHelper.ToDisplayName(color); #endif } diff --git a/components/Converters/src/DoubleToVisibilityConverter.cs b/components/Converters/src/DoubleToVisibilityConverter.cs index 7e1bc731..48aad016 100644 --- a/components/Converters/src/DoubleToVisibilityConverter.cs +++ b/components/Converters/src/DoubleToVisibilityConverter.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// This class converts a double value into a Visibility enumeration. /// -public class DoubleToVisibilityConverter : DoubleToObjectConverter +public partial class DoubleToVisibilityConverter : DoubleToObjectConverter { /// /// Initializes a new instance of the class. diff --git a/components/Converters/src/EmptyCollectionToObjectConverter.cs b/components/Converters/src/EmptyCollectionToObjectConverter.cs index 908e468d..5ddefe6b 100644 --- a/components/Converters/src/EmptyCollectionToObjectConverter.cs +++ b/components/Converters/src/EmptyCollectionToObjectConverter.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Converters; /// This class converts a collection size into an other object. /// Can be used to convert to bind a visibility, a color or an image to the size of the collection. /// -public class EmptyCollectionToObjectConverter : EmptyObjectToObjectConverter +public partial class EmptyCollectionToObjectConverter : EmptyObjectToObjectConverter { /// /// Checks collection for emptiness. diff --git a/components/Converters/src/EmptyStringToObjectConverter.cs b/components/Converters/src/EmptyStringToObjectConverter.cs index 32ef44bd..c01d65d4 100644 --- a/components/Converters/src/EmptyStringToObjectConverter.cs +++ b/components/Converters/src/EmptyStringToObjectConverter.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI.Converters; /// This class converts a string value into a an object (if the value is null or empty returns the false value). /// Can be used to bind a visibility, a color or an image to the value of a string. /// -public class EmptyStringToObjectConverter : EmptyObjectToObjectConverter +public partial class EmptyStringToObjectConverter : EmptyObjectToObjectConverter { /// /// Checks string for emptiness. diff --git a/components/Converters/src/FileSizeToFriendlyStringConverter.cs b/components/Converters/src/FileSizeToFriendlyStringConverter.cs index 93db3317..c5d4e3b2 100644 --- a/components/Converters/src/FileSizeToFriendlyStringConverter.cs +++ b/components/Converters/src/FileSizeToFriendlyStringConverter.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// Converts a file size in bytes to a more human-readable friendly format using /// -public class FileSizeToFriendlyStringConverter : IValueConverter +public partial class FileSizeToFriendlyStringConverter : IValueConverter { /// public object Convert(object value, Type targetType, object parameter, string language) diff --git a/components/Converters/src/IFormattableToStringConverter.cs b/components/Converters/src/IFormattableToStringConverter.cs index e95f8a98..b099e2c3 100644 --- a/components/Converters/src/IFormattableToStringConverter.cs +++ b/components/Converters/src/IFormattableToStringConverter.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI.Converters; /// Value converter that converts an to a formatted . /// The string format needs to be passed as the converter parameter. /// -public class IFormattableToStringConverter : IValueConverter +public partial class IFormattableToStringConverter : IValueConverter { // TODO: Provide property to set a IFormatProvider for the 2nd parameter to ToString diff --git a/components/Converters/src/ResourceNameToResourceStringConverter.cs b/components/Converters/src/ResourceNameToResourceStringConverter.cs index fd498650..f8341eca 100644 --- a/components/Converters/src/ResourceNameToResourceStringConverter.cs +++ b/components/Converters/src/ResourceNameToResourceStringConverter.cs @@ -15,7 +15,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// Value converter that look up for the source string in the App Resources strings and returns its value, if found. /// -public sealed class ResourceNameToResourceStringConverter : IValueConverter +public sealed partial class ResourceNameToResourceStringConverter : IValueConverter { #if WINAPPSDK && !HAS_UNO private readonly ResourceManager _resourceManager = new ResourceManager(); diff --git a/components/Converters/src/StringFormatConverter.cs b/components/Converters/src/StringFormatConverter.cs index 4ea75524..e0b10d8f 100644 --- a/components/Converters/src/StringFormatConverter.cs +++ b/components/Converters/src/StringFormatConverter.cs @@ -9,7 +9,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// This class provides a binding converter to display formatted strings /// -public class StringFormatConverter : IValueConverter +public partial class StringFormatConverter : IValueConverter { /// /// Return the formatted string version of the source object. diff --git a/components/Converters/src/StringVisibilityConverter.cs b/components/Converters/src/StringVisibilityConverter.cs index 1291edde..edbb669f 100644 --- a/components/Converters/src/StringVisibilityConverter.cs +++ b/components/Converters/src/StringVisibilityConverter.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// This class converts a string value into a Visibility value (if the value is null or empty returns a collapsed value). /// -public class StringVisibilityConverter : EmptyStringToObjectConverter +public partial class StringVisibilityConverter : EmptyStringToObjectConverter { /// /// Initializes a new instance of the class. diff --git a/components/Converters/src/TaskResultConverter.cs b/components/Converters/src/TaskResultConverter.cs index 72bc54a7..3c2e84cc 100644 --- a/components/Converters/src/TaskResultConverter.cs +++ b/components/Converters/src/TaskResultConverter.cs @@ -17,7 +17,7 @@ namespace CommunityToolkit.WinUI.Converters; #if NET8_0_OR_GREATER [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("This method uses reflection to try to access the Task.Result property of the input Task instance.")] #endif -public sealed class TaskResultConverter : IValueConverter +public sealed partial class TaskResultConverter : IValueConverter { /// public object Convert(object value, Type targetType, object parameter, string language) diff --git a/components/Converters/src/VisibilityToBoolConverter.cs b/components/Converters/src/VisibilityToBoolConverter.cs index 6813c78b..5bf25c00 100644 --- a/components/Converters/src/VisibilityToBoolConverter.cs +++ b/components/Converters/src/VisibilityToBoolConverter.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Converters; /// /// This class converts a Visibility enumeration to a boolean value. /// -public class VisibilityToBoolConverter : IValueConverter +public partial class VisibilityToBoolConverter : IValueConverter { /// /// Convert a value to boolean. diff --git a/components/Extensions/src/Markup/Abstract/TextIconExtension.cs b/components/Extensions/src/Markup/Abstract/TextIconExtension.cs index 2354661a..c603cb3e 100644 --- a/components/Extensions/src/Markup/Abstract/TextIconExtension.cs +++ b/components/Extensions/src/Markup/Abstract/TextIconExtension.cs @@ -4,8 +4,9 @@ #if WINAPPSDK using Microsoft.UI.Text; -#endif +#else using Windows.UI.Text; +#endif namespace CommunityToolkit.WinUI; @@ -33,12 +34,20 @@ protected static FontFamily SymbolThemeFontFamily /// /// Gets or sets the thickness of the icon glyph. /// - public FontWeight FontWeight { get; set; } = FontWeights.Normal; + #if WINUI3 + public Windows.UI.Text.FontWeight FontWeight { get; set; } = Microsoft.UI.Text.FontWeights.Normal; + #elif WINUI2 + public Windows.UI.Text.FontWeight FontWeight { get; set; } = Windows.UI.Text.FontWeights.Normal; + #endif /// /// Gets or sets the font style for the icon glyph. /// - public FontStyle FontStyle { get; set; } = FontStyle.Normal; + #if WINUI3 + public Windows.UI.Text.FontStyle FontStyle { get; set; } = Windows.UI.Text.FontStyle.Normal; + #elif WINUI2 + public Windows.UI.Text.FontStyle FontStyle { get; set; } = Windows.UI.Text.FontStyle.Normal; + #endif /// /// Gets or sets the foreground for the icon. diff --git a/components/Extensions/src/Markup/BitmapIconExtension.cs b/components/Extensions/src/Markup/BitmapIconExtension.cs index b48f81ff..68140d1d 100644 --- a/components/Extensions/src/Markup/BitmapIconExtension.cs +++ b/components/Extensions/src/Markup/BitmapIconExtension.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI; /// Custom which can provide values. /// [MarkupExtensionReturnType(ReturnType = typeof(BitmapIcon))] -public sealed class BitmapIconExtension : MarkupExtension +public sealed partial class BitmapIconExtension : MarkupExtension { /// /// Gets or sets the representing the image to display. diff --git a/components/Extensions/src/Markup/BitmapIconSourceExtension.cs b/components/Extensions/src/Markup/BitmapIconSourceExtension.cs index 85a70994..26136aa9 100644 --- a/components/Extensions/src/Markup/BitmapIconSourceExtension.cs +++ b/components/Extensions/src/Markup/BitmapIconSourceExtension.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI; /// Custom which can provide values. /// [MarkupExtensionReturnType(ReturnType = typeof(BitmapIconSource))] -public sealed class BitmapIconSourceExtension : MarkupExtension +public sealed partial class BitmapIconSourceExtension : MarkupExtension { /// /// Gets or sets the representing the image to display. diff --git a/components/Extensions/src/Markup/EnumValuesExtension.cs b/components/Extensions/src/Markup/EnumValuesExtension.cs index d0a1751e..833b7069 100644 --- a/components/Extensions/src/Markup/EnumValuesExtension.cs +++ b/components/Extensions/src/Markup/EnumValuesExtension.cs @@ -11,7 +11,7 @@ namespace CommunityToolkit.WinUI; #if NET8_0_OR_GREATER [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("It might not be possible to create an array of a user-defined enum type at runtime.")] #endif -public sealed class EnumValuesExtension : MarkupExtension +public sealed partial class EnumValuesExtension : MarkupExtension { /// /// Gets or sets the of the target diff --git a/components/Extensions/src/Markup/FontIconExtension.cs b/components/Extensions/src/Markup/FontIconExtension.cs index 4a090833..98704666 100644 --- a/components/Extensions/src/Markup/FontIconExtension.cs +++ b/components/Extensions/src/Markup/FontIconExtension.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI; /// Custom which can provide values. /// [MarkupExtensionReturnType(ReturnType = typeof(FontIcon))] -public class FontIconExtension : TextIconExtension +public partial class FontIconExtension : TextIconExtension { /// /// Gets or sets the value representing the icon to display. diff --git a/components/Extensions/src/Markup/FontIconSourceExtension.cs b/components/Extensions/src/Markup/FontIconSourceExtension.cs index f09a9bf9..617e9710 100644 --- a/components/Extensions/src/Markup/FontIconSourceExtension.cs +++ b/components/Extensions/src/Markup/FontIconSourceExtension.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI; /// Custom which can provide values. /// [MarkupExtensionReturnType(ReturnType = typeof(FontIconSource))] -public class FontIconSourceExtension : TextIconExtension +public partial class FontIconSourceExtension : TextIconExtension { /// /// Gets or sets the value representing the icon to display. diff --git a/components/Extensions/src/Markup/NullableBoolExtension.cs b/components/Extensions/src/Markup/NullableBoolExtension.cs index c55cb607..de7b1a00 100644 --- a/components/Extensions/src/Markup/NullableBoolExtension.cs +++ b/components/Extensions/src/Markup/NullableBoolExtension.cs @@ -9,7 +9,7 @@ namespace CommunityToolkit.WinUI; /// See https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/17767198-nullable-dependency-properties. /// [MarkupExtensionReturnType(ReturnType = typeof(bool?))] -public class NullableBoolExtension : MarkupExtension +public partial class NullableBoolExtension : MarkupExtension { /// /// Gets or sets a value indicating whether the value of the Boolean is true. Ignored if is true. diff --git a/components/Extensions/src/Markup/OnDeviceExtension.cs b/components/Extensions/src/Markup/OnDeviceExtension.cs index 42335ee0..3f388b24 100644 --- a/components/Extensions/src/Markup/OnDeviceExtension.cs +++ b/components/Extensions/src/Markup/OnDeviceExtension.cs @@ -20,7 +20,7 @@ namespace CommunityToolkit.WinUI; /// xmlns:ui="using:CommunityToolkit.WinUI.UI" /> /// /// -public class OnDeviceExtension : MarkupExtension +public partial class OnDeviceExtension : MarkupExtension { /// /// Gets the current device family. diff --git a/components/Extensions/src/Markup/SymbolIconExtension.cs b/components/Extensions/src/Markup/SymbolIconExtension.cs index 3a33e533..b2af2344 100644 --- a/components/Extensions/src/Markup/SymbolIconExtension.cs +++ b/components/Extensions/src/Markup/SymbolIconExtension.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI; /// Custom which can provide symbol-based values. /// [MarkupExtensionReturnType(ReturnType = typeof(FontIcon))] -public class SymbolIconExtension : TextIconExtension +public partial class SymbolIconExtension : TextIconExtension { /// /// Gets or sets the value representing the icon to display. diff --git a/components/Extensions/src/Markup/SymbolIconSourceExtension.cs b/components/Extensions/src/Markup/SymbolIconSourceExtension.cs index 555db096..e3731817 100644 --- a/components/Extensions/src/Markup/SymbolIconSourceExtension.cs +++ b/components/Extensions/src/Markup/SymbolIconSourceExtension.cs @@ -8,7 +8,7 @@ namespace CommunityToolkit.WinUI; /// Custom which can provide symbol-baased values. /// [MarkupExtensionReturnType(ReturnType = typeof(FontIconSource))] -public class SymbolIconSourceExtension : TextIconExtension +public partial class SymbolIconSourceExtension : TextIconExtension { /// /// Gets or sets the value representing the icon to display. diff --git a/components/Extensions/src/Shadows/AttachedShadowBase.cs b/components/Extensions/src/Shadows/AttachedShadowBase.cs index 90145fe1..add9ac80 100644 --- a/components/Extensions/src/Shadows/AttachedShadowBase.cs +++ b/components/Extensions/src/Shadows/AttachedShadowBase.cs @@ -9,10 +9,12 @@ using Microsoft.UI; using Microsoft.UI.Composition; using Microsoft.UI.Xaml.Hosting; +using Colors = Microsoft.UI.Colors; #else using Windows.Foundation.Metadata; using Windows.UI.Composition; using Windows.UI.Xaml.Hosting; +using Colors = Windows.UI.Colors; #endif namespace CommunityToolkit.WinUI; diff --git a/components/ImageCropper/src/ImageCropperThumb.cs b/components/ImageCropper/src/ImageCropperThumb.cs index d79a7dbe..8036dc8f 100644 --- a/components/ImageCropper/src/ImageCropperThumb.cs +++ b/components/ImageCropper/src/ImageCropperThumb.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// The control is used for . /// -public class ImageCropperThumb : Control +public partial class ImageCropperThumb : Control { private readonly TranslateTransform _layoutTransform = new(); internal const string NormalState = "Normal"; diff --git a/components/Media/src/Brushes/BackdropBlurBrush.cs b/components/Media/src/Brushes/BackdropBlurBrush.cs index b6159604..b22db802 100644 --- a/components/Media/src/Brushes/BackdropBlurBrush.cs +++ b/components/Media/src/Brushes/BackdropBlurBrush.cs @@ -17,7 +17,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// The is a that blurs whatever is behind it in the application. /// -public class BackdropBlurBrush : XamlCompositionEffectBrushBase +public partial class BackdropBlurBrush : XamlCompositionEffectBrushBase { /// /// The instance currently in use diff --git a/components/Media/src/Brushes/BackdropGammaTransferBrush.cs b/components/Media/src/Brushes/BackdropGammaTransferBrush.cs index c0129f64..a438e3b1 100644 --- a/components/Media/src/Brushes/BackdropGammaTransferBrush.cs +++ b/components/Media/src/Brushes/BackdropGammaTransferBrush.cs @@ -15,7 +15,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// A brush which alters the colors of whatever is behind it in the application by applying a per-channel gamma transfer function. See https://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_GammaTransferEffect.htm. /// -public class BackdropGammaTransferBrush : XamlCompositionBrushBase +public partial class BackdropGammaTransferBrush : XamlCompositionBrushBase { /// /// Gets or sets the amount of scale to apply to the alpha chennel. diff --git a/components/Media/src/Brushes/BackdropInvertBrush.cs b/components/Media/src/Brushes/BackdropInvertBrush.cs index b5cc729e..7d1bf0a2 100644 --- a/components/Media/src/Brushes/BackdropInvertBrush.cs +++ b/components/Media/src/Brushes/BackdropInvertBrush.cs @@ -11,7 +11,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// The is a which inverts whatever is behind it in the application. /// -public class BackdropInvertBrush : XamlCompositionEffectBrushBase +public partial class BackdropInvertBrush : XamlCompositionEffectBrushBase { /// protected override PipelineBuilder OnPipelineRequested() diff --git a/components/Media/src/Brushes/BackdropSaturationBrush.cs b/components/Media/src/Brushes/BackdropSaturationBrush.cs index f965bb2e..0eb9242b 100644 --- a/components/Media/src/Brushes/BackdropSaturationBrush.cs +++ b/components/Media/src/Brushes/BackdropSaturationBrush.cs @@ -15,7 +15,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// Brush which applies a SaturationEffect to the Backdrop. http://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_SaturationEffect.htm /// -public class BackdropSaturationBrush : XamlCompositionEffectBrushBase +public partial class BackdropSaturationBrush : XamlCompositionEffectBrushBase { /// /// The instance currently in use diff --git a/components/Media/src/Brushes/BackdropSepiaBrush.cs b/components/Media/src/Brushes/BackdropSepiaBrush.cs index 73f28a36..68180b3d 100644 --- a/components/Media/src/Brushes/BackdropSepiaBrush.cs +++ b/components/Media/src/Brushes/BackdropSepiaBrush.cs @@ -15,7 +15,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// Brush which applies a SepiaEffect to the Backdrop. http://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_SepiaEffect.htm /// -public class BackdropSepiaBrush : XamlCompositionEffectBrushBase +public partial class BackdropSepiaBrush : XamlCompositionEffectBrushBase { /// /// The instance currently in use diff --git a/components/Media/src/Brushes/ImageBlendBrush.cs b/components/Media/src/Brushes/ImageBlendBrush.cs index 8f541a46..368ba267 100644 --- a/components/Media/src/Brushes/ImageBlendBrush.cs +++ b/components/Media/src/Brushes/ImageBlendBrush.cs @@ -20,7 +20,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// Brush which blends a to the Backdrop in a given mode. See http://microsoft.github.io/Win2D/html/T_Microsoft_Graphics_Canvas_Effects_BlendEffect.htm. /// -public class ImageBlendBrush : XamlCompositionBrushBase +public partial class ImageBlendBrush : XamlCompositionBrushBase { private LoadedImageSurface? _surface; private CompositionSurfaceBrush? _surfaceBrush; diff --git a/components/Media/src/Brushes/PipelineBrush.cs b/components/Media/src/Brushes/PipelineBrush.cs index 8267c7dd..1122f72b 100644 --- a/components/Media/src/Brushes/PipelineBrush.cs +++ b/components/Media/src/Brushes/PipelineBrush.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Media; /// A that renders a customizable Composition/Win2D effects pipeline /// [ContentProperty(Name = nameof(Effects))] -public sealed class PipelineBrush : XamlCompositionEffectBrushBase +public sealed partial class PipelineBrush : XamlCompositionEffectBrushBase { /// /// Gets or sets the source for the current pipeline (defaults to a with source). diff --git a/components/Media/src/Brushes/TilesBrush.cs b/components/Media/src/Brushes/TilesBrush.cs index 894e98ab..b37ca066 100644 --- a/components/Media/src/Brushes/TilesBrush.cs +++ b/components/Media/src/Brushes/TilesBrush.cs @@ -9,7 +9,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// A that displays a tiled image /// -public sealed class TilesBrush : XamlCompositionEffectBrushBase +public sealed partial class TilesBrush : XamlCompositionEffectBrushBase { /// /// Gets or sets the to the texture to use diff --git a/components/Media/src/Brushes/XamlCompositionBrush.cs b/components/Media/src/Brushes/XamlCompositionBrush.cs index 2b507da9..2df79241 100644 --- a/components/Media/src/Brushes/XamlCompositionBrush.cs +++ b/components/Media/src/Brushes/XamlCompositionBrush.cs @@ -29,7 +29,7 @@ public delegate Task XamlEffectAnimation(T value, TimeSpan duration) /// /// A simple that can be used to quickly create XAML brushes from arbitrary pipelines /// -public sealed class XamlCompositionBrush : XamlCompositionEffectBrushBase +public sealed partial class XamlCompositionBrush : XamlCompositionEffectBrushBase { /// /// Gets the pipeline for the current instance diff --git a/components/Media/src/Effects/Extensions/BackdropSourceExtension.cs b/components/Media/src/Effects/Extensions/BackdropSourceExtension.cs index d969b82a..266d8563 100644 --- a/components/Media/src/Effects/Extensions/BackdropSourceExtension.cs +++ b/components/Media/src/Effects/Extensions/BackdropSourceExtension.cs @@ -11,7 +11,7 @@ namespace CommunityToolkit.WinUI.Media; /// A backdrop effect that can sample from a specified source /// [MarkupExtensionReturnType(ReturnType = typeof(PipelineBuilder))] -public sealed class BackdropSourceExtension : MarkupExtension +public sealed partial class BackdropSourceExtension : MarkupExtension { #if WINUI2 /// Gets or sets the background source mode for the effect (the default is ). diff --git a/components/Media/src/Effects/Extensions/ImageSourceExtension.cs b/components/Media/src/Effects/Extensions/ImageSourceExtension.cs index 8c04b7a9..011a5caf 100644 --- a/components/Media/src/Effects/Extensions/ImageSourceExtension.cs +++ b/components/Media/src/Effects/Extensions/ImageSourceExtension.cs @@ -9,7 +9,7 @@ namespace CommunityToolkit.WinUI.Media; /// /// An image effect, which displays an image loaded as a Win2D surface /// -public sealed class ImageSourceExtension : ImageSourceBaseExtension +public sealed partial class ImageSourceExtension : ImageSourceBaseExtension { /// protected override object ProvideValue() diff --git a/components/Media/src/Effects/Extensions/SolidColorSourceExtension.cs b/components/Media/src/Effects/Extensions/SolidColorSourceExtension.cs index 1f713f44..69565092 100644 --- a/components/Media/src/Effects/Extensions/SolidColorSourceExtension.cs +++ b/components/Media/src/Effects/Extensions/SolidColorSourceExtension.cs @@ -11,7 +11,7 @@ namespace CommunityToolkit.WinUI.Media; /// An effect that renders a standard 8bit SDR color on the available surface /// [MarkupExtensionReturnType(ReturnType = typeof(PipelineBuilder))] -public sealed class SolidColorSourceExtension : MarkupExtension +public sealed partial class SolidColorSourceExtension : MarkupExtension { /// /// Gets or sets the color to display diff --git a/components/Media/src/Effects/Extensions/TileSourceExtension.cs b/components/Media/src/Effects/Extensions/TileSourceExtension.cs index a68956ee..95269f68 100644 --- a/components/Media/src/Effects/Extensions/TileSourceExtension.cs +++ b/components/Media/src/Effects/Extensions/TileSourceExtension.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Media; /// An effect that loads an image and replicates it to cover all the available surface area /// /// This effect maps to the Win2D effect -public sealed class TileSourceExtension : ImageSourceBaseExtension +public sealed partial class TileSourceExtension : ImageSourceBaseExtension { /// protected override object ProvideValue() diff --git a/components/Primitives/src/StaggeredLayout/StaggeredLayout.cs b/components/Primitives/src/StaggeredLayout/StaggeredLayout.cs index 9e35fa36..384d0614 100644 --- a/components/Primitives/src/StaggeredLayout/StaggeredLayout.cs +++ b/components/Primitives/src/StaggeredLayout/StaggeredLayout.cs @@ -10,7 +10,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// Arranges child elements into a staggered grid pattern where items are added to the column that has used least amount of space. /// -public class StaggeredLayout : VirtualizingLayout +public partial class StaggeredLayout : VirtualizingLayout { /// /// Initializes a new instance of the class. diff --git a/components/Primitives/src/SwitchPresenter/CaseCollection.cs b/components/Primitives/src/SwitchPresenter/CaseCollection.cs index a0ad7777..2eab6497 100644 --- a/components/Primitives/src/SwitchPresenter/CaseCollection.cs +++ b/components/Primitives/src/SwitchPresenter/CaseCollection.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// An collection of to help with XAML interop. /// -public class CaseCollection : DependencyObjectCollection +public partial class CaseCollection : DependencyObjectCollection { /// /// Initializes a new instance of the class. diff --git a/components/Primitives/src/WrapLayout/WrapLayout.cs b/components/Primitives/src/WrapLayout/WrapLayout.cs index 7bc99a0f..cb3f9462 100644 --- a/components/Primitives/src/WrapLayout/WrapLayout.cs +++ b/components/Primitives/src/WrapLayout/WrapLayout.cs @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Controls; /// When is set to Orientation.Horizontal, element are arranged in rows until the available width is reached and then to a new row. /// When is set to Orientation.Vertical, element are arranged in columns until the available height is reached. /// -public class WrapLayout : VirtualizingLayout +public partial class WrapLayout : VirtualizingLayout { /// /// Gets or sets a uniform Horizontal distance (in pixels) between items when is set to Horizontal, diff --git a/components/RadialGauge/src/RadialGaugeAutomationPeer.cs b/components/RadialGauge/src/RadialGaugeAutomationPeer.cs index 2550a8ca..cc8400d3 100644 --- a/components/RadialGauge/src/RadialGaugeAutomationPeer.cs +++ b/components/RadialGauge/src/RadialGaugeAutomationPeer.cs @@ -13,7 +13,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// Exposes to Microsoft UI Automation. /// -public class RadialGaugeAutomationPeer : +public partial class RadialGaugeAutomationPeer : RangeBaseAutomationPeer, IRangeValueProvider { diff --git a/components/RichSuggestBox/samples/SuggestionTemplateSelector.cs b/components/RichSuggestBox/samples/SuggestionTemplateSelector.cs index 2e4089b7..ac1fbf2d 100644 --- a/components/RichSuggestBox/samples/SuggestionTemplateSelector.cs +++ b/components/RichSuggestBox/samples/SuggestionTemplateSelector.cs @@ -4,7 +4,7 @@ namespace RichSuggestBoxExperiment.Samples; -public class SuggestionTemplateSelector : DataTemplateSelector +public partial class SuggestionTemplateSelector : DataTemplateSelector { public DataTemplate? Person { get; set; } diff --git a/components/SettingsControls/samples/SettingsExpanderItemsSourceSample.xaml.cs b/components/SettingsControls/samples/SettingsExpanderItemsSourceSample.xaml.cs index 80a68344..28d00375 100644 --- a/components/SettingsControls/samples/SettingsExpanderItemsSourceSample.xaml.cs +++ b/components/SettingsControls/samples/SettingsExpanderItemsSourceSample.xaml.cs @@ -61,7 +61,7 @@ public class MyDataModel public string? Url { get; set; } } -public class MyDataModelTemplateSelector : DataTemplateSelector +public partial class MyDataModelTemplateSelector : DataTemplateSelector { public DataTemplate? ButtonTemplate { get; set; } public DataTemplate? LinkButtonTemplate { get; set; } diff --git a/components/SettingsControls/src/Helpers/CornerRadiusConverter.cs b/components/SettingsControls/src/Helpers/CornerRadiusConverter.cs index 5a1a5737..d833b4b8 100644 --- a/components/SettingsControls/src/Helpers/CornerRadiusConverter.cs +++ b/components/SettingsControls/src/Helpers/CornerRadiusConverter.cs @@ -3,7 +3,7 @@ // See the LICENSE file in the project root for more information. namespace CommunityToolkit.WinUI.Controls; -internal class CornerRadiusConverter : IValueConverter +internal partial class CornerRadiusConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { diff --git a/components/SettingsControls/src/SettingsCard/SettingsCardAutomationPeer.cs b/components/SettingsControls/src/SettingsCard/SettingsCardAutomationPeer.cs index dc049ca0..6d287812 100644 --- a/components/SettingsControls/src/SettingsCard/SettingsCardAutomationPeer.cs +++ b/components/SettingsControls/src/SettingsCard/SettingsCardAutomationPeer.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// AutomationPeer for SettingsCard /// -public class SettingsCardAutomationPeer : FrameworkElementAutomationPeer +public partial class SettingsCardAutomationPeer : FrameworkElementAutomationPeer { /// /// Initializes a new instance of the class. diff --git a/components/SettingsControls/src/SettingsExpander/SettingsExpanderAutomationPeer.cs b/components/SettingsControls/src/SettingsExpander/SettingsExpanderAutomationPeer.cs index d6cb35a6..0fef3e63 100644 --- a/components/SettingsControls/src/SettingsExpander/SettingsExpanderAutomationPeer.cs +++ b/components/SettingsControls/src/SettingsExpander/SettingsExpanderAutomationPeer.cs @@ -12,7 +12,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// AutomationPeer for SettingsExpander /// -public class SettingsExpanderAutomationPeer : FrameworkElementAutomationPeer +public partial class SettingsExpanderAutomationPeer : FrameworkElementAutomationPeer { /// /// Initializes a new instance of the class. diff --git a/components/SettingsControls/src/SettingsExpander/SettingsExpanderItemStyleSelector.cs b/components/SettingsControls/src/SettingsExpander/SettingsExpanderItemStyleSelector.cs index f87f57a8..c62e654a 100644 --- a/components/SettingsControls/src/SettingsExpander/SettingsExpanderItemStyleSelector.cs +++ b/components/SettingsControls/src/SettingsExpander/SettingsExpanderItemStyleSelector.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// used by to choose the proper container style (clickable or not). /// -public class SettingsExpanderItemStyleSelector : StyleSelector +public partial class SettingsExpanderItemStyleSelector : StyleSelector { /// /// Gets or sets the default . diff --git a/components/Sizers/src/SizerAutomationPeer.cs b/components/Sizers/src/SizerAutomationPeer.cs index 16462c7f..93931a55 100644 --- a/components/Sizers/src/SizerAutomationPeer.cs +++ b/components/Sizers/src/SizerAutomationPeer.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Controls.Automation.Peers; /// /// Defines a framework element automation peer for the controls. /// -public class SizerAutomationPeer : FrameworkElementAutomationPeer +public partial class SizerAutomationPeer : FrameworkElementAutomationPeer { /// /// Initializes a new instance of the class. diff --git a/components/TabbedCommandBar/src/TabbedCommandBarItemTemplateSelector.cs b/components/TabbedCommandBar/src/TabbedCommandBarItemTemplateSelector.cs index bea08963..5197d742 100644 --- a/components/TabbedCommandBar/src/TabbedCommandBarItemTemplateSelector.cs +++ b/components/TabbedCommandBar/src/TabbedCommandBarItemTemplateSelector.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// used by for determining the style of normal vs. contextual s. /// -public class TabbedCommandBarItemTemplateSelector : DataTemplateSelector +public partial class TabbedCommandBarItemTemplateSelector : DataTemplateSelector { /// /// Gets or sets the of a normal . diff --git a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs index b3c8b7df..8a9d1b87 100644 --- a/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs +++ b/components/TokenizingTextBox/src/TokenizingTextBoxAutomationPeer.cs @@ -14,7 +14,7 @@ namespace CommunityToolkit.WinUI.Automation.Peers; /// /// Defines a framework element automation peer for the control. /// -public class TokenizingTextBoxAutomationPeer : ListViewBaseAutomationPeer, IValueProvider +public partial class TokenizingTextBoxAutomationPeer : ListViewBaseAutomationPeer, IValueProvider { /// /// Initializes a new instance of the class. diff --git a/components/TokenizingTextBox/src/TokenizingTextBoxStyleSelector.cs b/components/TokenizingTextBox/src/TokenizingTextBoxStyleSelector.cs index 8d75fafa..200ab74c 100644 --- a/components/TokenizingTextBox/src/TokenizingTextBoxStyleSelector.cs +++ b/components/TokenizingTextBox/src/TokenizingTextBoxStyleSelector.cs @@ -7,7 +7,7 @@ namespace CommunityToolkit.WinUI.Controls; /// /// used by to choose the proper container style (text entry or token). /// -public class TokenizingTextBoxStyleSelector : StyleSelector +public partial class TokenizingTextBoxStyleSelector : StyleSelector { /// /// Gets or sets the of a token item. diff --git a/tooling b/tooling index 028fe9c5..df780af4 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 028fe9c50bd98d926bbed5d612668d753aa09b24 +Subproject commit df780af45016b43606f04d202255e37033402af5