My diagram shape have DropShadowEffect which is setted by style
<Style x:Key="SquidShapeStyle"
TargetType="telerik:RadDiagramShape">
<Setter Property="IsResizingEnabled"
Value="True" />
<Setter Property="IsManipulationAdornerVisible"
Value="True" />
<Setter Property="Focusable"
Value="True" />
<Setter Property="MinHeight"
Value="60" />
<Setter Property="MinWidth"
Value="60" />
<Setter Property="VerticalAlignment"
Value="Stretch" />
<Setter Property="HorizontalAlignment"
Value="Stretch" />
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#595757"
Opacity="0.6"></DropShadowEffect>
</Setter.Value>
</Setter>
</Style>
When operate as follows
1 select several shapes 2 Zoom in the selection bound , 3 unselect the shapes,
sometimes some shape's DropShadowEffect is not display,it seems the DropShadowEffect is covered by the shape
what is the reason for this? thanks
7 Answers, 1 is accepted
Thank you for the provided picture.
I tried to reproduce this disappearing of the shadow effect but to no avail. I am attaching to this reply the sample project which I used to test your scenario. Can you take a look at this project and let me know what I need to modify in order to reproduce this.
From the attached picture I can see that you have used a custom template for the shapes. Can you remove the custom template and just add a DropShadowEffect and check again if this behavior appears again.
Regards,
Dinko
Progress Telerik

Hi Dinko Thanks you
sorry to replay you so long
It is strange that the problem seems caused by RadRibbonWindow, Based on the demo you provide,I replace window to RadRibbonWindow, the issue is easy to reproduce,Did I miss something important
the code is as follows
<telerik:RadRibbonWindow x:Class="Shape_ShadowEffect.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Shape_ShadowEffect"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<telerik:RadRibbonWindow.Resources>
<Style TargetType="telerik:RadDiagramShape">
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#595757"
Opacity="0.6"></DropShadowEffect>
</Setter.Value>
</Setter>
</Style>
</telerik:RadRibbonWindow.Resources>
<Grid>
<telerik:RadDiagram>
<telerik:RadDiagramShape Position="200,100" Content="Shape 1"/>
<telerik:RadDiagramShape Position="300,100" Content="Shape 2"/>
<telerik:RadDiagramShape Position="200,200"
Content="Shape 3" />
<telerik:RadDiagramShape Position="300,200"
Content="Shape 4" />
</telerik:RadDiagram>
</Grid>
</telerik:RadRibbonWindow>
Thank you for the provided additional information but still, I wasn't able to reproduce this behavior my side. I am attaching an updated version of my previous project with the information from your last post. I think I am missing a step to reproduce this effect. Can you double check the attached project? I have also attached a video which demonstrates the steps which I perform on my side.
Regards,
Dinko
Progress Telerik

Hi Dinko,
I'm sorry my description is inaccurate, not zoom, is resize, drag the corner of the selection rect to resize,
during resizing, the shadow sometimes appear and sometimes dissapper
Thank you for the provided details.
I manage to reproduce this behavior on my side. It seems that in some condition the RadRibbonWindow is clipping the diagram shapes. Is there a specific reason why you use RadRibbonWindow. If you replace the RadRibbonWindow with a RadWindow such behavior is not observed. If it is applicable for your main application, can you replace the RadRibbonWindow with a RadWindow and check again on your side.
Regards,
Dinko
Progress Telerik

Hi Dinko thanks
My app has a RadRibbonView on the top of mainwindow,
https://docs.telerik.com/devtools/wpf/controls/radribbonview/features/ribbon-controls/ribbon-window-wpf
this artical introduce that the MainWindow shoule be a RadRibbonWindow when use RadRibbonView
Is there a way to achieve a good experience when use RadWindow to contains RadRibbonView
What RadRibbonWindow provides you is the out of the box ability to move the titlebar and toolbar of the ribbon on top of the window title, thus imitating the MS Office tools look. If you don't need this you can use RadWindow.
I am afraid that at this point I can't provide you with a solution for the shadow. It seems that for some reason the WPF framework doesn't render the shadow properly which causes the area of the shadow to be clipped entirely from the rendering process.
Regards,
Martin Ivanov
Progress Telerik