Cant add using Telerik.UI.Xaml.Controls.Grid namespace - xaml

I am trying to use the Telerik RadDataGrid in my project. For starting off I have just copied the code given the "Telerik Controls Example" app. But when I try adding the namespace "using Telerik.UI.Xaml.Controls.Grid" I get an error
"The name "RadDataGrid" does not exist in the namespace "using:Telerik.UI.Xaml.Controls.Grid".
I have been able to use the RadCustomHubTile easily till now but RadDataGrid is giving me problems. RadDataGrid does not appear in the toolbox also.
I have added Rad Controls for Windows 8 in the reference section.
I am using C#, xaml, visual studio 2012 and trying to build a windows 8 app.
Any help would be appreciated.
Thanx :)

For those who do not know the answer here it is.
Just add this namespace: xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
And in no time you can be using <telerik:RadGridView />!!!!

Related

Vb.net Mobile Application

I've been assigned a school project in which we're asked to develop a survey app for device/mobile use using VB.net.
I've started learning some Visual Basic, yet I'm failing to understand the following. I've downloaded Visual Studio 2017, do I need to download something extra so that I'm able to program for a mobile device? Or what is it that I need to do? I'm quite confused, I'd really appreciate some sort of help with understanding what's going on. I've been searching on the Internet quite some time now, and all I've found is "Visual Basic for Windows Phone Developer Tools - RTW", which is a version for 2010 and I'm not quite sure if it's what I need anyway. Another thing I've found is Xamarin.
Any help will be highly appreciated and excuse me for such a dumb question.
You're probably looking for Xamarin. It lets you use C#, F# and VB.NET code to develop cross-platform apps including native apps for iOS and Android.
Note that Xamarin doesn't completely or directly support VB.NET. You'll have to do the following steps to get started:
Create a new C# solution of the type Mobile App (Xamarin.Forms). You need to have the Mobile Development with .NET workload installed for this.
In said solution, add a Visual Basic .NET Class Library (.NET Standard). After creating the project, right-click it, click Properties, and change the Default Namespace to match the existing C# project(s).
Right-click the VB.NET project again, click "Manage NuGet Packages", then install Xamarin.Forms.
After this, you will want to rename Class1.vb to App.vb. Paste the following starter / example code there:
Imports Xamarin.Forms
Public Class App
Inherits Application
Public Sub New()
Dim label = New Label With {
.HorizontalTextAlignment = TextAlignment.Center,
.FontSize = Device.GetNamedSize(NamedSize.Medium, GetType(Label)),
.Text = "Welcome to Xamarin.Forms with Visual Basic.NET"
}
Dim stack = New StackLayout With {
.VerticalOptions = LayoutOptions.Center
}
stack.Children.Add(label)
Dim page = New ContentPage
page.Content = stack
MainPage = page
End Sub
End Class
Update the Android and iOS projects so that they reference the Visual Basic .NET project(s), rather than the C# project created by the template. Right-click on the References node in the Android and iOS projects to open the Reference Manager. Untick the C# library and tick the Visual Basic .NET library instead. Do this for both iOS and Android. Finally, delete the C# project. You can now develop your Xamarin project in VB.NET by adding more .vb files as necessary.
Unfortunately, VB.NET has a few limitations in regards to Xamarin:
You can't write custom renderers or dependency service implementations in VB.NET. These must be written in C# or F#.
You can't include XAML pages in VB.NET projects. You'll have to use a workaround that involves including XAML pages in a seperate, C#-based, portable class library, referencing it, and populating the XAML models with VB.NET through databinding. Alternatively, this may be of help for using XAML with VB.NET.
More info can be found at Microsoft's website.
I know this question is three years old, and that lots of time has passed since that school project, but I hope this answer was helpful to you regardless, and / or that it will be helpful to others who have the same or a similar question. To anyone about to write Xamarin apps in VB.NET or who is currently doing so, I wish you the best of luck!

Xamarin Forms InitializeComponent does not exist

I am learning Xamarin Forms for Visual Studio 2015 and trying to create a simple Shared project using Xaml but I keep getting InitializeComponent does not exist (as well as any reference to Xaml controls in cs classes).
It is my understanding that in the latest versions of Xamarin, Xaml works in Shared Xamarin Forms Projects (and not only in PCL projects). I've tried running the latest betas that got released less than a month ago but still no luck.
Any advice is greatly appreciated.
Turns out I had to manually change the properties for all Xaml files like so:
Build Action: Embedded resource
Custom Tool: MSBuild:UpdateDesignTimeXaml
For some reason adding new Xaml forms files doesn't set these by default in VS2015 with latest Xamarin.
I had the same issue. And it turned out to be that fully qualified Class Name (x:Class attribute in the main node) in the XAML file must match exactly the xaml.cs file's name. I corrected the namespace casing and it worked!!
This happens when your XAML markup is invalid. There is a background compilation task that parses the XAML file and generates a code file (this is normally hidden from the developer) which declares those control references. If your XAML is not valid then this task will fail silently, and your first hints are the symptoms you describe.
Comment out the contents of your XAML file using standard XML comment syntax (wrap it with <!-- and -->), then rebuild your project to clear out all of the errors. You may also need to comment out some code in your .cs files temporarily to get it to build. Once you get it building, then you can go back and start uncommenting your XAML until you find the part that was breaking it.
Try it:
Open the Package Manager Console, put the follow line:
update-package -project your_pcl_project_name -reinstall

I upgraded a Visual Basic 6 project to Visual Basic 2008 project and got unknown errors

I've recently upgraded my project to Visual Basic 2008 and I'm getting the following errors which I cannot identify, I hope someone can help:
AxThreed.AxSSCommand is not defined
AxActiveInput.AxSSDropDownEdit is not defined
AxPVTEXT3DLib.AxPVText3D is not defined
Any idea what this is and how to fix it?
It looks these are references to 3rd Party ActiveX controls. ActiveThreed, Protoview Date Control, etc
You may need to Add/Re-Add the relevant control to your project. Right click on the toolbox so select the items to want to use. If you don't see them in the list to may need to register/re-register them on that machine
Have a look at this page for more info: http://msdn.microsoft.com/en-us/library/ms973200.aspx
Number 3 here seems to indicate how to fix the problem... I believe some of your controls are not loading.

Intellisense not working for XAML in VS2012 and only partially in Blend

I'm trying to get RC of Visual Studio 2012 working for XAML files. I can't seem to get any XAML Intellisense and the option within Tools is greyed out.
I've also tried to run the solution using Blend, however I only get Intellisense for custom controls such as telerik then.
When ever I drag controls onto the design surface I get an "Object reference not set to an instance of an object" exception but the control is still added to the surface.
I've read that this was a bug within VS11 and was fixed with in the Visual Studio 2012 RC.
I've created a new Silverlight Application and the intellisense is working so i'm wondering if its an issue with how my projects are set up.
I have all of my Styles within a separate themes project, which is referenced by other all other projects. Within the designer these references show up as errors but when the application runs they are resolved fine.
Would unresolved resources at design time affect Intellisense?
Click "Build -> Clean Solution", then "Build -> Build Solution". ("Rebuild Solution" alone doesn't work.) [Source]
If you have a reference to any of the expression blend dlls for interactions and you are using silverlight5 you will need to update the following dlls:
Microsoft.Expression.Controls.dll
Microsoft.Expression.Effects.dll
Microsoft.Expression.Interactions.dll
System.Windows.Interactivity.dll
Blend + SketchFlow Preview for Microsoft Visual Studio 2012
http://www.microsoft.com/en-us/download/details.aspx?id=30702
Ref Location:
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Silverlight\v5.0\Libraries
Exact same problem here, using WPF.
In my case, removing:
<Page.Resources>
<vm:AnyViewModel x:Key="anyViewModel" />
</Page.Resources>
Solve my problem...
One known cause of XAML Intellisense failure is if System.Windows.Controls.Toolkit is one of the project references. I've seen where deleting that reference instantly fixes the problem. The problem is described in the comments of this Connect bug for VS2012 Beta, but it applies to the RC with the July update as well.
I've found that some xaml designers for a control have this issue, where other controls are just fine.
The problem (in my case) seems to be if parameters are null or events call uninitialized singletons. Something the designer gives you a stack trace and other timers renders with no problem.
I've found by changing the back-end code for pages that don't have Intelli-sense to include DesignerProperties always fixes the issue (in my cases).
public Homing()
{
InitializeComponent();
if (DesignerProperties.GetIsInDesignMode(this))
return;
// some other code here that may have uninitialized members
}
t
I'm not sure if I had the same problem, but Intellisense mysteriously stopped working for me within a XAML file. I tried cleaning the build as someone suggested, but that didn't work.
After I restarted Visual Studio 2013, the Intellisense in the XAML page started to work again.

Different style on buttons in messagebox in different projects

I have a problem with the style of the button in a messagebox.
If I call the following line of code in a current project the button get one type of visual apperance/style. And If I create a new VB.NET Windows Application project it gets a standard Windows apperance/style.
Windows.Forms.MessageBox.Show("Yaay", "Yaay!", Windows.Forms.MessageBoxButtons.OK)
See the difference between the buttons below.
I suspect they inherit the visual apperance from it's parent or maybe from some project settings. But I have not been able to find out from where.
Both projects are created in VB.NET 2.0, and both have same System.Windows.Forms - dll as reference (c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll).
http://www.freeimagehosting.net/uploads/2a956b0675.jpg
Screenshot can be found here.
Thanx in advance for your help!
I cannot see the image from where I am so I'm not sure if this will help you.
Open the Project Properties for each solution and look at the Application tab.
Is the "Enable Applicaton Framework" item ticked? And if so, is the "Enable XP Visual Styles" item also ticked?
That may the difference in the two solutions.