WPF Toolkit doesn't get displayed in the toolbox - wpf

I installed the wpftoolkit.msi and added a reference to it, but it doesn't get dipslayed in the toolbox, is there anything else that needs to be done? I followed the instructions from the code plex site, I can access some of the controls from code, only a few, I added WPFToolkit as a reference, does any other reference need to be added for the chart controls and so that they can be accessed from the toolbox?
EDIT: I added all dlls in the folder and still cannot access the chart control.
Answer: I provided an answer bellow you neeed to include a different namespace for the charts the default one from the codeplex site doesn't include all controls.

I believe this is the answer if you want to add the charting controls to your toolbox.
If you just add a reference to what the codeplex site says you won't get all controls.
using Microsoft.Windows.Controls doesn't work you need to include the reference name, if you click on properties for the reference name you can copy name, for charting it is: System.Windows.Controls.DataVisualization.Toolkit
For the toolbox:
Go to your toolbox, right click create a new tab. In the new tab right click choose items add all the controls from the System.Windows.Controls.DataVisualization.Toolkit namespace. You should have all of them in the toolbox.

Here it is http://wpf.codeplex.com/releases/view/40535
Installation and Usage Instructions
Please note: The WPF Toolkit is dependent on .NET Framework 3.5 SP1. You must install .NET Framework 3.5 SP1 in order to use any features in the Toolkit.
Instructions for using the WPF Toolkit binaries:
Install .NET Framework 3.5 SP1
If you have a previous version of WPF Toolkit installed, uninstall it through the Remove Programs dialog on the Control Panel (look for "WPF Toolkit October 2008" or "WPF Toolkit January 2009" or "WPF Toolkit March 2009" or "WPF Toolkit June 2009")
Download the WPFToolkit_Binaries or WPFToolkit_BinariesAndSource
Run the WPFToolkit.msi to install the WPFToolkit.dll and WPF Toolkit design time binaries to your Program Files folder
Reference the binaries in your project:
Reference WPFToolkit.dll in your project
Add a using statement ("using Microsoft.Windows.Controls;") to the top of .cs files
Add a new xmlns (for example, xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit") to the top of XAML files
Remember to use the namespace prefix (in the above example, ) in the body of your XAML

Related

How do I add XAML windows to a .Net Core "WPF Application"?

In Visual Studio 2019, if I create a new "WPF Application" using .Net Core (top in the screenshot below) it will create a project for me that does in fact include a working XAML setup. However, there is no way that I can find to add a new XAML window through the VS interface. Right-clicking on a folder, choosing Add and then Window (WPF) just gives you the codebehind, no XAML anywhere.
If instead I create a new "WPF App (.NET Framework)" (bottom in the screenshot) It creates a similar project but I can in fact add XAML windows via right-click and selecting Add as above, including the relevant codebehind.
What gives? If we want to use .Net Core do we have to create the XAML files manually? Am I missing something? XAML is explicitly not listed under the .Net Core option, but the project creation process does indeed create XAML files in the project as expected.
With suggestions above, I was able to get this working in VS2019. To condense the answer:
In the project properties, ensure the "Output Type" is "Windows Application".
Ensure the target framework is ".Net 5.0"
Then directly edit the .csproj file by adding <UseWPF>true</UseWPF> to the first <PropertyGroup>.
Right-click on the project, select: Add > Window
I seem to have answered my own question but it seems useful so I will leave it up here. When you create your .Net Core WPF Application, if you choose .NetCore 3.1 (Long-term support) you get the behavior I describe above (no ability to add XAML windows). If you choose .NET 5.0 (Current) it works as expected and you can add XAML windows.

How do I add a new WPF UserControl to my .NetCore 3.1 application?

How do I create a WPF UserControl using .Net Core 3.1 in Visual Studio 2019?
I looked through the default templates available in "Add .. New .. Dialog," but I don't seem to see it.
Am I missing something?
Do I need to add it from a the command line?
I've got the DevExpress WPF/.Net Core packages installed and can add a DevExpress flavoured UserControl.
I'm able to create/add one of those from the installed templates.
How do I do so in vanilla .NetCore/WPF
Thanks,JohhB
Same as WinForms...compile your code, open Toolbox, drag it from there onto either your designer page or into the XAML code directly.

Extended DataGrid in Silverlight

How can I add this (ExtendedDataGrid) to my Silverlight project ?
Here is the link to the project I am referring to
http://wpfextendeddatagrid.codeplex.com
Error is:
You can't add a reference to ExtendedGrid.dll as it was not built
against the Silvelright runtime. Silverlight projects will only work
with Silverlight assemblies.
That project was built for WPF and not Silverlight.
This is extended version of WPF toolkit DataGrid control.
Please note: As code of wpf datatgrid in wpftoolkit is moved inside
ExtendedDataGrid project , kindly update Microsoft.Windows.Controls
namespace to ExtendedGrid.Microsoft.Windows.Controls to use existing
objects.
The error message you included in your post states as much.
Silvelright projects will only work with Silvelright assemblies
Remember Silverlight is a stripped down version of .Net used for the browser plugin, and as such will not work with full version of .Net.
Unless you actually go into the source code of that project and try to port it to silverlight then there is currently no other way for you to add that project to your Silverlight project.
I would advise looking into the Silvelright toolkit and it's datagrid. It may not be as full featured as the one you are trying to reference but it covers the basic requirements for a datagrid in silverlight. There are also some open sourced versions that have been extended for silvelright.

AutoCompleteBox not found in wpf toolkit using visual studio 2012

This is really a wanted feature, AutoCompleteBox (not AutoCompleteComboBox apparently).
However, visual studio 2012 cannot find the AutoCompleteBox control. But I have not tried in earlier version of vs, so it may not be a version matter.
I installed wpf toolkit, added those extensions to my WPF project:
WPF Toolkit
WPF Toolkit Design
WPF Toolkit Input Design
WPF Toolkit Input Visual Studio Design
WPF Toolkit Layout
WPF Toolkit Layout Visual Studio Design
WPF Toolkit Visual Studio Design.
Looks almost like virii to me. Every permutation of words are used...
Well well in my WPF project, I added
xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
to a window and tried to also add a auto complete box like this:
<toolkit:AutoCompleteBox />
but AutoCompleteBox does not seem to exist, the first component that is listed when I have typed
<toolkit:
is ButtonBaseBehavior.
Not all the toolkit controls are included in the "main" namepace.
Let me explain it how are the toolkit dlls are built up:
You can also install the WPF toolkit through NuGet:
PM> Install-Package WPFToolkit
It will add three dlls to your project:
WPFToolkit.dll this contains the core/stable controls of toolkit which can be found in the xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
System.Windows.Controls.Input.Toolkit.dll this dll contains the preview controls like AutoCompleteBox and Rating
System.Windows.Controls.Layout.Toolkit.dll this dll contains the preview layout controls like the Accordion
The preview controlls are not included in the main xmls namespace so you need to use a the namespace form the corresponding preview dll:
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
<controls:AutoCompleteBox />
Add a reference to (Included in WPFToolkit):
System.Windows.Controls.Input.Toolkit.dll
and then in your xaml at the top:
xmlns:System_Windows_Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
and for using it anywhere in your code just like this:
<System_Windows_Controls:AutoCompleteBox />

Silverlight Toolkit - Where is the AutoCompleteBox?

I just added the Silverlight 4 toolkit to my project via NuGet. (NuGet package "Silverlight Toolkit - All")
I can't find the AutoCompleteBox anywhere in the dlls added to my project. Where is it?
Things I've tried:
I cracked open all the dlls it added
to my project, and I don't see
AutoCompleteBox in any of them.
Looking at the Silverlight Toolkit
discussions, I don't see anyone mentioning its removal.
Looking at the Silverlight Toolkit
changeset history, I don't see it
being mentioned as removed.
I browsed the source, and I do see AutoCompleteBox in there, but it get compiled into a dll System.Windows.Controls.Input.dll, but when I add the project in via NuGet, I don't get that dll, instead I get System.Windows.Controls.Input.Toolkit.dll
Where is the AutoCompleteBox in the Silverlight Toolkit?
Its not in the Silveright Toolkit any more. As of Silverlight 4 it moved to the SDK. You should be able to drag the AutoCompleteBox from you toolbar to the designer and VS will add the reference to System.Windows.Controls.Input.dll for you.

Resources