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

Add resource dictionary and all controls disappears

4 Answers 174 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dario Concilio
Top achievements
Rank 2
Dario Concilio asked on 06 Sep 2016, 12:56 PM

Hi to all,

I'm creating new project with a Common Style Dictionary, and merged with application resource.

When I apply style to my control, this one disappers!

I tryed with RadWindow and Radbutton, same result.

 

I've attach several screeshots.

Can you help me to understand?

4 Answers, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 06 Sep 2016, 01:34 PM
Hello Dario,

When using implicit styles, you need to base these styles on the default styles that the theme provides.
The convention is the following: the key for every control`s default style consists of the name of the control followed by a "Style" suffix.

So, in this case, the two styles from your dictionary should be defined like so:

<Style x:Key="RadButtonDialogStyle" TargetType="telerik:RadButton" BasedOn="{StaticResource RadButtonStyle}">
    <!-- -->
</Style>
<Style x:Key="RadWindowDialogModalFreezeStyle" TargetType="telerik:RadWindow" BasedOn="{StaticResource RadWindowStyle}">
    <!-- -->
</Style>

I hope that this solves your issue. Please let me know if any further questions or concerns arise.

Regards,
Dilyan Traykov
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Dario Concilio
Top achievements
Rank 2
answered on 06 Sep 2016, 01:41 PM

Perfect!

Thank you.

0
Dario Concilio
Top achievements
Rank 2
answered on 09 Sep 2016, 08:46 AM

Why it shows me this error, now?

What am I missing?

0
Accepted
Martin
Telerik team
answered on 09 Sep 2016, 11:52 AM
Hello Dario,

Make sure you are merging the needed resource dictionaries in you App.xaml. Try to clean, rebuild, restart VisualStudio if needed. Or empty the bin an obj folders of the project.

Is the project running property, without any errors? If it visualizes properly, then you don't need to worry about it.

Regards,
Martin
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Dario Concilio
Top achievements
Rank 2
Answers by
Dilyan Traykov
Telerik team
Dario Concilio
Top achievements
Rank 2
Martin
Telerik team
Share this question
or