This is a migrated thread and some comments may be shown as answers.

the DropShadowEffect sometimes not display

7 Answers 70 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
rui
Top achievements
Rank 1
rui asked on 11 Jun 2018, 02:48 AM

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

Sort by
0
Dinko
Telerik team
answered on 13 Jun 2018, 07:18 AM
Hi rui,

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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
rui
Top achievements
Rank 1
answered on 16 Aug 2018, 08:59 AM

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>

0
Dinko
Telerik team
answered on 17 Aug 2018, 12:36 PM
Hi rui,

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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
rui
Top achievements
Rank 1
answered on 19 Aug 2018, 11:45 PM

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

0
Dinko
Telerik team
answered on 21 Aug 2018, 02:32 PM
Hi rui,

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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
rui
Top achievements
Rank 1
answered on 30 Aug 2018, 03:18 AM

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 

0
Martin Ivanov
Telerik team
answered on 03 Sep 2018, 11:39 AM
Hello Rui,

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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Diagram
Asked by
rui
Top achievements
Rank 1
Answers by
Dinko
Telerik team
rui
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or