Hi,
I installed the WPF controls (trial version, NoXaml) and setup my application according to the docs.
Unfortunately the controls do neither appear in the designer nor in the application after starting it.
You find attached a screenshot from the references. I used the references from C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2018\Binaries.NoXaml\WPF45
Here is the App.xml content:
<Application.Resources>
<ResourceDictionary x:Key="Default">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office_Black;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office_Black;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office_Black;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Am I missing something? Any help would be appreciated...
Regards,
Abid
5 Answers, 1 is accepted
I noticed that I referenced the wrong theme dll. But the problem remains after putting the correct theme dll (see attached image).
Please tell me what I'm doing wrong.
I noticed that i reference the wrong theme dll. But after fixing it (see attached image) the problem remains.
What am I doing wrong?
Thank you for the provided pictures.
I tested this behavior, but it seems to work as expected on my side. Attached to this reply is the project which I used to test your scenario. Can you take a look at this project and let me know if I am missing something in order to reproduce this behavior?
I am looking forward to your reply.
Regards,
Dinko
Progress Telerik
I figured it out: the controls are not visible when using a key for the ResourceDictionary (see first post)..
This is reproducible in the example you provided. Omitting the key led to another problem: I use styles, e.g. to assure all have a Margin of 5:
<
Application.Resources
>
<
ResourceDictionary
>
<
ResourceDictionary.MergedDictionaries
>
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Office2016;component/Themes/System.Windows.xaml"
/>
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.xaml"
/>
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Input.xaml"
/>
<
ResourceDictionary
Source
=
"/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Input.xaml"
/>
<
ResourceDictionary
>
<
Style
x:Key
=
"FormElementStyle"
TargetType
=
"{x:Type FrameworkElement}"
>
<
Setter
Property
=
"Margin"
Value
=
"5"
/>
</
Style
>
</
ResourceDictionary
>
</
ResourceDictionary.MergedDictionaries
>
</
ResourceDictionary
>
</
Application.Resources
>
But when I attach a style to a RadAutoComplete
<
telerik:RadAutoCompleteBox
Style
=
"{StaticResource FormElementStyle}"
/>
it again becomes invisible. Without the style it remains visible.
So, how can I apply custom styles to the telerik controls?
Regards,
Abid
This behavior is expected if you are using NoXaml binaries in your application. Looking at the provided code snippet the BasedOn property is not set on your custom styles. When working with our NoXaml binaries and Implicit Styles you need to have in mind that your custom Styles that target our controls should be based on their default styles. You can do this by setting the BasedOn property of the custom Style. You can find more information in our Styling the Controls help article. In your case check the following code snippet.
<
Style
x:Key
=
"FormElementStyle"
TargetType
=
"{x:Type telerik:RadAutoCompleteBox}"
BasedOn
=
"{StaticResource RadAutoCompleteBoxStyle}"
>
<
Setter
Property
=
"Margin"
Value
=
"5"
/>
</
Style
>
Regards,
Dinko
Progress Telerik