Skip to content

Shouln't AttachedCardShadow be in Microsoft.Toolkit.Uwp.UI? #4299

Open
@Sergio0694

Description

@Sergio0694

Overview

With respect to the ongoing effort to streamline the namespace structure in the Toolkit (see #3422), and also because this particular instance is technically breaking our established pattern of using the core namespace for additional "addon" features from other packages, shouldn't AttachedCardShadow be in Microsoft.Toolkit.Uwp.UI like all the other shadow APIs? The fact it's currently in Microsoft.Toolkit.Uwp.UI.Media makes it particularly clunky to use in XAML as users need to declare two separate XML namespaces to be able to use Effects.Shadow and then AttachedCardShadow inside of it. This similar issue has also come up before when working on the various animation APIs, and the decision there was to unify namespaces too.

⚠ Issues

This would be a breaking change, which is unfortunate. If we did this and pushed out a new package, we'd both source-break customers referencing the package directly and using it, as well as we'd binary-break (at runtime, yikes) customers having a UWP lib referencing 7.1 that is then loaded up in a UWP app using a new version of the Toolkit, as the new binary would be resolved and that would throw a TypeLoadException (or similar) when trying to load AttachedCardShadow at runtime.

I wish I had spotted the incorrect namespace sooner 😥

NuGet Package(s): 7.1.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions