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

New to WPF and problem with Style in Resource Dictionary

2 Answers 165 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
danparker276
Top achievements
Rank 2
danparker276 asked on 10 Sep 2012, 04:57 PM
I've been working with silverlight mostly, but I'm converting an app to WPF.  I'm using a mystyle.xaml resource dictionary and it's compiling ok, but I get this error message when I debug the program, 'Failed to create a 'TargetType' from the text 'telerik:RadDatePicker'. ...
The initelisense says it's ok and it compiles.  The project it configured with the dropdown Telerik->RadControls for WPF ->Configure Project and I have all the references.

Also, I don't see the Telerik controls in the toolbar to the left.  Even when I try to 'Launch Toolbox Configurator', it's doesn't do anything.  This doesn't bother me since I usually don't use the toolbox, but it may be related.  Maybe I'm missing something on my install

2 Answers, 1 is accepted

Sort by
0
danparker276
Top achievements
Rank 2
answered on 11 Sep 2012, 04:46 PM
Seems like when I add my Source to the resource directory, I can't add the directory name or it will fail.  Must be a WPF thing

This works:
<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="StyleBrush.xaml" />
    <ResourceDictionary Source="StylesCommon.xaml" />
</ResourceDictionary.MergedDictionaries>

This won't (either one), I'm not sure why.  It's ok though, it was just different than silverlight
<ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="/Application;component/StyleBrush.xaml" />
    <ResourceDictionary Source="Assets/StylesCommon.xaml" />
</ResourceDictionary.MergedDictionaries>
0
Accepted
Vanya Pavlova
Telerik team
answered on 12 Sep 2012, 07:59 AM
Hello Dan,

 

Will you please check the following thread and let us know how this works for you? 
As per your question about the missing controls in the toolbox you may review the following help article. 
In order to avoid such problems it is essential to ensure that you do not have installed multiple versions of Telerik RadControls/WPF.  



I look forward to hearing from you!

 

Greetings,
Vanya Pavlova
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
General Discussions
Asked by
danparker276
Top achievements
Rank 2
Answers by
danparker276
Top achievements
Rank 2
Vanya Pavlova
Telerik team
Share this question
or