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

using Telerik.Windows.Core;

7 Answers 208 Views
Installer and Visual Studio Extensions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeff
Top achievements
Rank 1
Jeff asked on 21 Jan 2013, 05:18 AM
First off, I am completely new to programming, so bear with me...

I am trying to add a Looping List to my project.

The documentation says I need to add these two usings:

using Telerik.Windows.Core;
using Telerik.Windows.Controls.Primitives;

After I add these dll references, I am not able to use Telerik.Windows.Core;

When typing in the using directive I get the options .Controls, .Data, and .Media, but not .Core;

Primitives seems to work ok.

Any thoughts on this?

PS:  I am using Visual Studio Express 2012 for Windows Phone.

7 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 22 Jan 2013, 09:51 AM
Hello Jeff,

Thanks for writing.

To use RadLoopingList you need both assemblies. However, you do not need to add the Core assembly namespace in XAML to define a LoopingList there. You only need the Primitives namespace.

My advice is to take a look at our Examples application (source available) and at the LoopingList examples specifically. They will easily get you started.

Greetings,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Jeff
Top achievements
Rank 1
answered on 22 Jan 2013, 02:39 PM

Do I need to add any usings in the code behind?

If I understand you correctly, I need to add the Core and Primitives references to the project, but in the code behind and XAML I only need to explicitly need to add Primitives?

Thanks for your help.

0
Deyan
Telerik team
answered on 23 Jan 2013, 07:25 AM
Hello Jeff,

Yes. The RadLoopingList-related logic is defined in the Primitives assembly. All types you directly need to setup the control are there so you need to add namespace references in XAML and C# to this assembly.

As I said, please refer to our Telerik Samples project for details on how to use the control.

All the best,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Jeff
Top achievements
Rank 1
answered on 23 Jan 2013, 04:48 PM
I'm sorry, but for someone that is new to programming, as I mentioned I am, the samples are terrible. Also, the documentation here: http://www.telerik.com/help/windows-phone/common-introduction.html does not match what's supplied in the samples as far as required usings and such. Please update.

I think the WP Toolkit has a looping selector, I'll give that a shot.
0
Deyan
Telerik team
answered on 24 Jan 2013, 10:16 AM
Hello Jeff,

Thanks for writing back.

Being new to programming, the easiest way for you to study things and get started with our controls is to take a look at sample code.

We have a very clear explanation with samples of how RadLoopingList is integrated into a Windows Phone application here:

http://www.telerik.com/help/windows-phone/radinfinitelistbox-getting-started.html

As you can see, the help states that you need to reference the following two Telerik assemblies:

Telerik.Windows.Core.dll
Telerik.Windows.Controls.Primitives.dll

After referencing these two assemblies, you will need to add the following prefix in the XAML code of the page you want to have a RadLoopingList instance:

xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"

In the code sample above the prefix is called telerikPrimitives and points to the Telerik.Windows.Controls namespace defined in the Telerik.Windows.Controls.Primitives assembly. Our base controls are defined in this namespace in the Telerik.Windows.Controls.Primitives.dll assembly so you need to have it in XAML in order to be able to use our controls on your page.

After doing this, you should be able to define a RadLoopingList instance onto your page:

<telerikPrimitives:RadLoopingList x:Name="radLoopingList" />

By setting the x:Name attached property you can access the control instance from the code-behind file via C#.

To fill the control with data you will need to use an instance of the LoopingListDataSource class. This class is defined in the Telerik.Windows.Controls.Primitives.dll in the Telerik.Windows.Controls namespace.

Here you can find extensive code samples that demonstrate how the LoopingListDataSource is used:

http://www.telerik.com/help/windows-phone/radinfinitelistbox-features-infinite-data-source.html

Based on your questions I believe you are a bit confused what the difference between adding a DLL reference and a using is, so let me give you some explanations. Adding a DLL reference is done via the Solution Explorer in Visual Studio. All DLL references of a project are visible in the References folder. When you add a DLL reference to a project, you immediately gain access to all public types defined in this DLL. You can use these types in C# or XAML by adding usings. Since in a single DLL many namespaces may exist (namespaces are way of grouping classes in a DLL which belong to a common context), you will need to specify which namespace you want to use by creating a using. The using in C# is created the following way:

using Telerik.Windows.Controls;

Whereas in XAML it is defined as a prefix:

xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"

So, in the case of the Telerik.Windows.Core.dll and Telerik.Windows.Controls.Primitives.dll you need both DLLs referenced in your project but since you want to use RadLoopingList and its supporting classes (like LoopingListDataSource) which are defined in the Primitives assembly, you only need to add usings to the namespaces defined in this assembly both in C# and in XAML (via the prefix shown above). The Telerik.Windows.Core.dll assembly contains logic which is used by the Telerik.Windows.Controls.Primitives.dll but not directly by you.

These are basic Silverlight and .NET principles which you will need to use with the Microsoft's Toolkit controls as well.

Another point I would like to make is that the Visual Studio code editor will automatically create usings for you when you try to use a type from a given assembly so you do not need to explicitly create them in C#. This, however, doe snot work this way in XAML - the prefixes there should be created by hand as described above.

So, if this information is not helpful, you can simply open a new support ticket, attach the project you want to have a RadLoopingList instance in and I will integrate the control for you.

As for our examples, I would kindly like to ask you for feedback if you think we can improve them so that they become more straightforward in terms of explaining how the controls are used.

Let me know if I can be of further help.

Greetings,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Mark
Top achievements
Rank 1
answered on 27 Jan 2017, 05:33 PM
I found Deyan's remarks while searching for an error resolution.  I've coded forever but am new to Telerik.  I'd like to follow Deyan's advice and reference the 2 "bare necessity?" dlls, but they weren't even installed by Telerik.  The VS designer error that I'm trying to resolve is:  The component 'Telerik.Windows.Core.Design.AppThemeTip' does not have a resource identified by the URI '/Telerik.Windows.Core.Design;component/appthemechanger/ui/appthemetip.xaml'.  I've verified consistent dll versions.  I'm not referencing any kind of Telerik "Theme" thing myself.  All I did was drag a RadGridView onto my WPF grid.
0
Ves
Telerik team
answered on 31 Jan 2017, 07:55 AM
Hi Mark,

This is a forum for our UI for Windows Phone suite. As you are using RadGridView for WPF, I would encourage you to search for similar issues in our GridView for WPF dedicated forum, and if you do not find the same problem discussed, feel free to post your question, providing all the details related to the issue.

Best regards,
Ves
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Installer and Visual Studio Extensions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Jeff
Top achievements
Rank 1
Mark
Top achievements
Rank 1
Ves
Telerik team
Share this question
or