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

AutoComplete not visible

5 Answers 61 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abid
Top achievements
Rank 1
Abid asked on 22 Mar 2018, 12:29 PM

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

Sort by
0
Abid
Top achievements
Rank 1
answered on 22 Mar 2018, 12:33 PM

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.

0
Abid
Top achievements
Rank 1
answered on 22 Mar 2018, 12:34 PM

I noticed that i reference the wrong theme dll. But after fixing it (see attached image) the problem remains.

What am I doing wrong?

0
Dinko | Tech Support Engineer
Telerik team
answered on 27 Mar 2018, 08:12 AM
Hello Abid,

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
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
Abid
Top achievements
Rank 1
answered on 31 Mar 2018, 01:35 PM

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

0
Dinko | Tech Support Engineer
Telerik team
answered on 03 Apr 2018, 12:29 PM
Hi 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
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.
Tags
General Discussions
Asked by
Abid
Top achievements
Rank 1
Answers by
Abid
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or