-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
DropDownShadow doesn't reponse to CornerRadius property #3516
Comments
Hello AbdAlghaniAlbiek, 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 🙌 |
@AbdAlghaniAlbiek Thanks for highlighting the issue! Not certain if this is a bug or there is anything that perhaps is required to make this work. Let's see if any devs can shed light on this 💡 |
@AbdAlghaniAlbiek can you provide more details on the XAML you're using? Screenshots are helpful too. As well as a mock-up of what you're expecting. Generally, you should use
You can try and see what the behavior is in your scenario by just overriding the style to add the <Style TargetType="controls:DropShadowPanel">
<Setter Property="IsTabStop"
Value="False" />
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:DropShadowPanel">
<Grid Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
CornerRadius="{TemplateBinding CornerRadius}">
<Border x:Name="ShadowElement"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> The only other thing is if you're trying to fill the shape with a composition brush, then you would be hitting this bug probably: microsoft/microsoft-ui-xaml#1884 |
@AbdAlghaniAlbiek any update on this? Are you still having this issue? |
@AbdAlghaniAlbiek did you have a chance to try what mentioned above? |
It doesn't work 😢
If you want check out by yourself
There is another problem that in offset z when i use it in first build
time, it works but in second build it doesn't response to value changes
especially when I give a zero value to it
في السبت، ٩ يناير ٢٠٢١ ٢:١٥ ص Kyaa Dost <[email protected]> كتب:
|
@AbdAlghaniAlbiek you need to share more details with us for us to be able to help you. Like recreating your scenario in our Sample App page and providing us the XAML to reproduce the issue. If you modify the sample we have in the sample app like this: <controls:DropShadowPanel BlurRadius="8"
ShadowOpacity="1"
OffsetX="4"
OffsetY="4"
Color="Black"
Margin="20"
IsMasked="True">
<Rectangle Width="100" Height="50"
Fill="Green" RadiusX="8" RadiusY="8" />
</controls:DropShadowPanel> You get this: Which seems like the effect you're looking for? |
@michael_hawker I don't know why it works with Rectangle (RadiusX, RadiusY) and doesn't work with Grid-stackpanel-.....(CornerRadius) |
## Fixes #3122 #3607 #3516 _Also implements #3693 for the new DropShadow._ FYI @seanocali as this is a different implementation approach (which is simpler to use outside of the DropShadowPanel we've been working on) but should hopefully achieve the same result. This PR adds attached shadows which can easily be attached to any FrameworkElement without needing to modify the layout like DropShadowPanel does today. They can also be shared using a resource, added to the style of an element, and animated! All the things! 🎉 ## PR Type What kind of change does this PR introduce? <!-- Please uncomment one or more options below that apply to this PR. --> <!-- - Bugfix --> - Feature by @Ryken100 and integrated/extended by @michael-hawker <!-- - Code style update (formatting) --> <!-- - Refactoring (no functional changes, no api changes) --> <!-- - Build or CI related changes --> <!-- - Documentation content changes --> <!-- - Sample app changes --> <!-- - Other... Please describe: --> ## What is the current behavior? DropShadowPanel is clunky and requires modifying how you layout your app. ## What is the new behavior? Just attach a shadow and be done! (DropShadowPanel is deprecated.) ## PR Checklist - [x] Composition Only Shadow Support? (with Target) - [x] Add XML Docs - [x] Animation Support to Explicit Animation System? - [x] Bug can't use `AttachedCardShadow` directly with `Border`? Please check if your PR fulfills the following requirements: <!-- and remove the ones that are not applicable to the current PR --> - [ ] Tested code with current [supported SDKs](../#supported) - [ ] Pull Request has been submitted to the documentation repository [instructions](../blob/main/Contributing.md#docs). Link: <!-- docs PR link --> - [ ] Sample in sample app has been added / updated (for bug fixes / features) - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/CommunityToolkit/WindowsCommunityToolkit-design-assets) - [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki) e.g. build changes, source generators, testing infrastructure, sample creation changes, etc... - [ ] Tests for the changes have been added (for bug fixes / features) (if applicable) - [ ] Header has been added to all new source files (run _build/UpdateHeaders.bat_) - [ ] Contains **NO** breaking changes <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. --> ## Other information <!-- Please add any other information that might be helpful to reviewers. -->
Our new attached shadow feature coming in 7.1 (available in |
Thank you all. I was following you on twitter, I saw a sample how to implement it in uwp application it is awesome 🔥 |
When I add DropDownShadow control to a control like rectangle then I make rectangle's corners more rounded the shadow stay with sharp corner to solve that I saw CornerRadius property that introduced in October update in DropDownShadow properties, and when I give values to CornerRadius property nothing change (shadow stay with sharp corners)
App min and target version:
Device form factor:
Visual Studio
The text was updated successfully, but these errors were encountered: