Microsoft.Phone.Controls.Toolkit unable to import using directive - windows-phone-7

I have downloaded and installed Microsoft.Phone.Controls.Toolkit and I am able to include it in the xaml page, but I am unable to include it in the C# file(like "using Microsoft.Phone.Controls.Toolkit" ). any idea why this happens?

For the xaml:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
You can use the controls in the C# file after you add the code post above.

...try to build and after add
using Microsoft.Phone.Controls.Toolkit;

Did you add the DLL as a reference to the project?

Related

What happened to HttpConfiguration.EnableSystemDiagnosticsTracing

I am using the new WebTools 2012.2, and the help files says to add config.EnableSystemDiagnosticsTracing to your Global.asax.
However, this method doesnt exist on HttpConfiguration.
The EnableSystemDiagnosticsTracing extension is part of the Tracing package. Do you have the Microsoft.AspNet.WebApi.Tracing package installed?
Also make sure to have the using System.Web.Http; namespace.
Documentation: link
To install use:
Install-Package Microsoft.AspNet.WebApi.Tracing
Update-Package Microsoft.AspNet.WebApi.WebHost
After that check the following in your project:
Add dll-file \packages\Microsoft.AspNet.WebApi.Tracing.5.2.2\lib\net45\System.Web.Http.Tracing.dll to your project.
Add the following to WebApiConfig.cs
using System.Web.Http;
using System.Web.Http.Tracing;
And
//tracing
config.EnableSystemDiagnosticsTracing();
Because it is an extension method, you need a using statement where the extension method is declared. So in your Global.asax.cs or whereever you want to call EnableSystemDiagnosticsTracing(), you need to add this at the top:
using System.Web.Http;
Shouldn't it trace by default to the Output window for projects created using WebAPI template, if you have Visual Studio 2012 ASP.NET and Web Tools 2012.2? EnableSystemDiagnosticsTracing does the same.

Property not visible

I've a problem with a datagrid on a simple windows form project (framework 4.0, VS2010).
In the code behind is not possible to access to the datagrid.Columns property. Am I missing an assembly reference?
These are my references:
Microsoft.CSharp,
System,
System.Core,
System.Data,
System.Data.DataSetExtensions,
System.Data.Entity,
System.Deployment,
System.Drawing,
System.Runtime.Serialization,
System.Security,
System.Windows.Forms,
System.Windows.Form.Ribbon35,
System.xml,
System.Xml.Linq,
WindowsBase,
WPFToolkit.Extended
I'm not sure but I don't see the System.Windows.Controls and you need that.
Assembly for datagrid columns: system.windows.controls.datagrid.columns
Also I want to suggest you Resharper a very nice tools when you have missing assemblies.
Maybe I figured out. That property seems to exist for wpf components only. In fact, for Windows form the datagrid assembly is System.Windows.Form while for wpf component is PrsentationFramework (System.Windows.Controls)

Multiple select using listpicker in windowsphone 7.5

SelectionMode property is not found in ListPicker.We included reference to Microsoft.Phone.Controls.Toolkit in our project and also included
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
in the xaml page.But we are not able to give SelectionMode=Multiple
Thank you
Make sure you have the latest version, previous versions didn't have a SelectionMode property

Silverlight ChartingToolKit is not coming in xaml page

i wanted to implement charts in my silverlight app.
i have installed SL4 in my VS.
The problem is i m not getting the chartingToolkit:Chart control in my xaml page.
Gives error saying control not found .
Did i forget to add any references?
or did my installation went wrong?
do i have to download any other plugin?
Thanks
Sajad
chartings controls are from the Silverlight toolkit, you need to install it first.;)
http://silverlight.codeplex.com/
i have added the assemblies as mentioned by Xin.
System.Windows.Controls.DataVisualization.Toolkit,
System.Windows.Controls.Toolkit
System.Windows.Controls.Toolkit.Internals
But my problem was actually solved by adding this to namespace area.
xmlns:toolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
and then i could use toolkit:Chart
:)

Embeding XAML resource in a C++/CLI assembly

I'm trying to embed a XAML file as a resource of my C++/CLI project (Using DevStudio 2005). I found few ways to do it but none of them is working properly.
Method 1. Embed it as a native resource
I used the .rc file to include the .xaml. I can easily load it using the native Win32 calls. Problem: the project is not recompiled if I change the xaml file.
Method 2. Embed it using the linker
I used the linker option "Embed Managed Resourcfe File" and added my xaml file there. I can easily use GetManifestResourceStream() after to load it. Problem: the project is not recompiled if I change the xaml file.
Method 3. Embed it using "Add Existing Item"
I tried to add the xaml file using "Project->Add->Existing Item" and then open my xaml file. Problem: When I popup the xaml file properties, I cannot find any "Build Tool" to compile/embed it. Can I get it from somewhere? Is there a command line I can use as a custom build step?
Method 4. Embed it using a .resx file
I tried several things but I never managed to load it at runtime using GetResourceStream(). For this one I would need a step-by-step procedure.
Can someone please tell me which method I should be using?

Resources