Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttachedCardShadow not working (WinUI 3 WinAppSDK 1.0 Preview 3) #4364

Closed
wbokkers opened this issue Nov 3, 2021 · 8 comments
Closed

AttachedCardShadow not working (WinUI 3 WinAppSDK 1.0 Preview 3) #4364

wbokkers opened this issue Nov 3, 2021 · 8 comments
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior WinUI 💠 Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3.
Milestone

Comments

@wbokkers
Copy link

wbokkers commented Nov 3, 2021

Describe the bug

I can't get the AttachedCardShadow to work in WinUI 3 Windows App SDK 1.0 Preview 3.

Steps to Reproduce

Using Windows App SDK 1.0 Preview 3 and WinUI 3,
And given this XAML:

   xmlns:ui="using:CommunityToolkit.WinUI.UI"
    xmlns:media="using:CommunityToolkit.WinUI.UI.Media">

     <Border Height="100" Width="100">
        <Border CornerRadius="8"
                BorderBrush="White" Background="LightGreen" BorderThickness="1">
           
        </Border>
        <ui:Effects.Shadow>
            <media:AttachedCardShadow CornerRadius="8"
                                    Offset="4,4"/>
        </ui:Effects.Shadow>
    </Border>

I get the following result:
image

Alas, no shadow.

Expected behavior

I would expect a shadow to appear

Environment

image
image

NuGet Package(s):

Package Version(s):

Windows 10 Build Number:

  • [ x] 19043.1320

App min and target version:

Min: 17763
Target: 19041

Device form factor:

  • [ x] Desktop

Visual Studio version:

image

@wbokkers wbokkers added the bug 🐛 An unexpected issue that highlights incorrect behavior label Nov 3, 2021
@ghost ghost added the needs triage 🔍 label Nov 3, 2021
@ghost
Copy link

ghost commented Nov 3, 2021

Hello wbokkers, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@wbokkers
Copy link
Author

wbokkers commented Nov 3, 2021

This is not a duplicate of #4331. I used the suggested solution, and the corner radius does not have any effect.

@michael-hawker michael-hawker added WinUI 💠 Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3. and removed needs triage 🔍 labels Nov 3, 2021
@michael-hawker
Copy link
Member

Yeah I hit this too, may be related to #3882. FYI @azchohfi

@michael-hawker
Copy link
Member

Validated the AttachedDropShadow was working though seems to have issues with CornerRadius

AttachedCardShadow was being blocked by an old UWP check, so we're investigating a fix. Thanks @azchohfi!

azchohfi added a commit that referenced this issue Nov 9, 2021
@michael-hawker
Copy link
Member

@wbokkers
Copy link
Author

wbokkers commented Nov 10, 2021

@michael-hawker I have an issue now with the AttachedCardShadow not starting at the edge of the control, but leaving a gap between the control and the shadow (only at the right and bottom edges):
image

I think this is somehow related with this WinUI issue:
microsoft/microsoft-ui-xaml#6207

@michael-hawker
Copy link
Member

@wbokkers yeah, I didn't notice this when putting a shadow on a square image, so seems related to the issue you linked to. Didn't know about that one, so thanks for linking!

@zipgenius
Copy link

I'm having the very same issue in WASDK 1.0 (no shadow attached to a Grid element)

@ghost ghost locked as resolved and limited conversation to collaborators Feb 25, 2022
@michael-hawker michael-hawker added this to the 7.1.2 milestone Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior WinUI 💠 Related to WinUI 3 Version or when paired with External can mean requires fix in WinUI 2/3.
Projects
None yet
Development

No branches or pull requests

3 participants