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

RadWindow DropShadow with Themes using XAML (Style Manager)?

9 Answers 508 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
Rob A. asked on 16 Dec 2020, 08:41 PM

Is there an easy method to adding/overriding a Drop Shadow for a RadWindow that's based on XAML Theme (Style manager).  Either via XAML attributes or code behind.

I looked at this process here but it doesn't work with Themes.

Cheers, Rob.

9 Answers, 1 is accepted

Sort by
0
Vicky
Telerik team
answered on 18 Dec 2020, 04:19 PM

Hello Rob,

It all depends on the theme you are using in your application.

Some of our themes take advantage of a helper Shadow element, which was introduced and designed specifically for the needs of the Material theme. Other themes that use it are the Office 2019, Crystal and Fluent themes. This shadow can be easily customized by its exposed properties, some of which are well documented in the following article.

The process described in the provided by you link is still applicable for the themes from Office Black to Expression Dark from our themes list. It will work for all other themes as well - you will need to extract the default style and template for the RadWindow and add / modify the preferred shadow element type.

I hope you find the above information helpful. For further assistance from my side, may I kindly ask you to provide some more information on the theme(s) you are using within you app?

I am looking forward to your reply.

Best regards,
Vicky
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 20 Jan 2021, 07:14 PM

Thanks for the response Vicky, but I was hoping for a simple "Shadow" property that I could enable/disable ... that's kinda why a I spent the yearly money to use these controls as to avoid coding around limitations.

Please add this to feature request.

Cheers, Rob.

0
Vicky
Telerik team
answered on 22 Jan 2021, 03:57 PM

Hi Rob,

Thank you for the feedback - I've gone ahead and logged a feature request on your behalf - you can cast your vote and follow it to subscribe to status updates.

In the meantime, I wanted to elaborate more on the RadWindow and its shadow. And more specifically, the MaterialAssist's Shadow.
If we use for example the Material theme with StyleManager and have a simple RadWindow, we can use the mat:MaterialAssit.ShadowDepth and mat:MaterialAssist.IsShadowDisabled attached properties to control it:

<telerik:RadWindow
        x:Class="RadWindow_Shadow_WPF_1499465.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
        Height="250" Width="400"
        telerik:StyleManager.Theme="Material"
        mat:MaterialAssist.ShadowDepth="Depth1">
    <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
        <TextBlock Text="My RadWindow Content"/>
    </Grid>
</telerik:RadWindow>

The first RadWindow from the image shows the result from the above code snippet. I think the others are self-explanatory too. The same is valid for the Office2019, Crystal and Fluent themes. If your aim is to control the strength of the shadow or remove it completely, I think this will work for you.

P.S. The above setup can be achieved through a Style if  your app has many RadWindows as well.

Best regards,
Vicky
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 22 Jan 2021, 06:34 PM

Hi Vicky,

I don't think that will work for me, the Theme is dynamically loaded when the application runs based on saved user settings.  The user can change theme's via my app which is saved to file and the application restarts (with user's selected theme).

What you have listed is a hard coded theme.

Appreciate you adding a Feature Request, I did up vote it with my comments.

Cheers, Rob.

0
Vicky
Telerik team
answered on 26 Jan 2021, 10:12 AM

Hello Rob,

Thank you for the comments in the Feature Request at our Feedback Portal.

May I ask you to elaborate a bit more on your exact requirement? Do you need to implement a different shadow effect than the default one for a theme? Or do you want to just be able to show or hide that shadow? Or both? Or it is something else?

Thank you for any help you can provide.

Regards,
Vicky
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 31 Jan 2021, 12:08 AM

Hi Vicky,

I don't necessarily want to implement anything (that's why I buy Telerik), I want to have the option to override the DropShadow settings for a RadWindow regardless of the Theme being used.  I do NOT want the drop shadow to be applied to every control on the RadWindow, just the RadWindow edge border ONLY so as to make child RadWindow "stand-out".

The problem with some of these themes (like Green or Expression_Dark) is that a small RadWindow child that is modal will tend to blend with the parent window (the smaller the child window the more of a blend problem).  End users click on something and a dialog windows shows but they don't easily see it and just keep clicking thinking nothing happened when in fact a small RadWindow did actually appear.  A drop shadow would make it much more apparent to the user.  

Cheers, Rob.

0
Vicky
Telerik team
answered on 02 Feb 2021, 03:52 PM

Hi Rob,

All the questions that I'm asking are in order to clarify the exact expectations of the feature request we are currently discussing.
Our aim is to continuously improve the experience with our controls so that they completely fulfil our clients' needs.

From our conversation, I am assuming that you need to be able to easily add or remove the shadow of a RadWindow. Is that correct?

If yes, there is one more thing that needs to be clarified. Some of our Telerik themes have built-in shadow elements by design, but others - don't.
The Green theme which you mention does not have a built-in shadow. Would you expect this theme to be affected by a potential mechanism for adding/removing a shadow in this case?

Thanks a lot for your time and cooperation - both are greatly appreciated!
I am looking forward to your reply.

Best Regards,
Vicky
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 02 Feb 2021, 08:06 PM

Hi Vicky,

The setting or RadWindow "Shadow" property would override the theme (any active theme) and would ONLY apply to the Window and not any child controls contained in the Window.

It would probably be good to allow the override of BlurRadius, Direction, and ShadowDepth.

For example (mockup):

<telerik:RadWindow x:Class="MyRadWindow"
        Header="Settings" WindowStartupLocation="CenterOwner" SizeToContent="True" ResizeMode="NoResize" MinWidth="500" MaxWidth="900" DropShadowOverride="True" DropShadowOverrideBlurRadius="10" DropShadowOverrideDirection"-90", DropShadowOverrideDepth="3" DropShadowOverrideColor="White">
     
    <Grid>
 
    <!-- UI code -->
 
    </Grid>
 
</telerik:RadWindow>

 

Cheers, Rob.

 

 

 

 

0
Vicky
Telerik team
answered on 04 Feb 2021, 04:19 PM

Hi Rob,

Thanks a lot for the clarifications - they were of great help.
I will add the updated information to the feature request.

If there is anything else I can assist you with, do not hesitate to contact me.

Regards,
Vicky
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Window
Asked by
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Vicky
Telerik team
Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or