Telerik's RadDataFilter not found - wpf

I am trying to start using Telerik's RadDataFilter.
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
...
<telerik:RadDataFilter Name="radDataFilter"
Source="{Binding FirstEntries}"/>
But I get an error:
The tag 'RadDataFilter' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'. Line 44 Position 10.
Could you please explain to me what I am missing? Thanks.

Does your project have references to Telerik.Windows.Controls.dll and Telerik.Windows.Controls.Data.dll? The Telerik documentation for the RadDataFilter mentions that both of these references are necessary.
I was able to reproduce the error you were getting by trying to build a project that uses a RadDataFilter but which has references to only one of the two assemblies mentioned. When I added a reference to the second, and rebuilt, the error went away.
(Admittedly, this was with the Silverlight version of the controls. However, the WPF and Silverlight versions of the Telerik RadControls are built from the same source code, so I expect that the WPF version of the controls will behave the same.)

Related

DataGrid2D - 'Attachable Property' warning in VS 2019

I'm using the DataGrid2D component (installed via NuGet) to allow me to bind a 2D array to a datagrid in a .Net Core 3.1 WPF project using Prism.
https://github.com/GuOrg/Gu.Wpf.DataGrid2D/blob/master/README.md
Everything works it's just that the designer breaks and VS gives me the following warning for the code snippet shown below:
The Attachable Property 'Array2D' was not found in type 'ItemSource'
Here's the alias I included in the top of the xaml page:
Any ideas how to resolve this?
Sadly I think this may be just one of countless bugs in the WPF designer.
Does it work when you run it?
You can try a sad loop of closing vs, git clean, rebuild etc. and maybe it goes away.

Error in Visual Studio 2017 trying to reference the WPF Extended Toolkit in XAML

I am attempting to use the WPF Extended Toolkit. I downloaded it and it is currently sitting in my project folder.
I right clicked the .dll file and checked "Unblock" following this answer. I have it referenced in my Visual Studio project.
I have it named WPF Extended Toolkit in my Toolbox.
I have the namespace in my XAML file.
When I try to use it in my XAML file, I'm getting the blue squiggly line stating, "The type toolkit:BusyIndicator was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built."
I'm very new to this, since I've only used what was available by default in WPF apps. Can someone tell me what I'm doing wrong? I thought I covered everything needed to get this going.
I figured it out! I found this answer!
Before adding the namespace, I rebuilt my project, then I added the namespace. IntelliSense picked it up and I was able to add my Busy Indicator.

Where do I find Galasoft.MvvmLight.WPF45 assembly?

I'm using VS2013 Express. I'm quite new in WPF and MVVM. I've downloaded mvvmlight using NuGet to my project. I'm tryinng to use GalaSoft_MvvmLight_Command:EventToCommand. As far as I know, I have to add reference in xaml by adding namespace:
xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight"
But, unfortunatelly I get error, that says:
The tag 'EventToCommand' does not exist in XML namespace
'clr-namespace:GalaSoft.MvvmLight;assembly=GalaSoft.MvvmLight'.
I've found some information, that I have to include GalaSoft.MvvmLight.WPF45 assembly, but I don't see this dll in packages\MvvmLightLibs.5.0.0.1\lib\ folder. There are many folders, for each .NET version etc, but each of these assemblies names are the same, without WPF45 sufix.What is going on? Where do I find this GalaSoft.MvvmLight.WPF45.dll assembly? Or maybe in version 5 was some changes made in names?
Edit:
Using object browser I found that EventToCommand is in GalaSoft.MvvmLight.Platform assembly in GalaSoft.MvvmLight.Command namespace. So I did
xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"
I can compile project now, but I still get errors in xaml (what is weird):
A value of type 'EventToCommand' cannot be added to a collection or dictionary of type 'TriggerActionCollection'
and
The type 'EventToCommand' from assembly 'GalaSoft.MvvmLight.Platform' is built with an older version of the Blend SDK, and is not supported in a Windows Presentation Framework 4 project.
and xaml editor can't display window properly (invalid markup).
Edit2:
Solution for invalid markup.
After I've changed the namespace to xmlns:cmd="http://www.galasoft.ch/mvvmlight" I also change project's target framework from 4.5 to 3.5. IDE shows an error about there are few NuGet packages that target other framework, so I returned to 4.5 - and it magically works now ;). Thanks all for help.
Here's how its done now in your XAML assuming you've got Version 4.0.0. Beat 1 or higher:
xmlns:cmd="http://www.galasoft.ch/mvvmlight"
I found this at the bottom the release notes here: http://www.mvvmlight.net/installing/changes/
Details
XmlnsDefinitionAttribute for GalaSoft.MvvmLight.Command in Extras assembly
Thanks to the addition of XmlnsDefinitionAttribute, you can simplify the inclusion of the MVVM Light EventToCommand action in XAML. See the before and after below:
Before:
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.SL4"
xmlns:cmd="http://www.galasoft.ch/mvvmlight"
x:Class="MvvmLight4.MainPage">
After:
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:cmd="http://www.galasoft.ch/mvvmlight"
x:Class="MvvmLight4.MainPage">
EventToCommand exists in the Extras assembly.
Try:
xmlns:GalaSoft_MvvmLight_Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras"
More Information:
To determine the assembly a class falls in, I usually Go To Definition and the assembly is referenced in the region at the top of the [from metadata] code file.

Re: Expander control in silverlight 4

I have installed the latest silverlight toolkit and dragged the expander control onto my design, there is some kind of an error going around with the name spaces, and my intellisense stopped to work after I added the control, following is the xmlns that is added to the application when I dragged the control onto the xaml editor:
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
Can anyone please identify why would this happen?
Thanks
It's been a long time since you posted your question, but in the case you still have the problem, I tell you that I had it too and it was a conflict in versions. In Silverlight 4, controls of the toolkit are integrated to the framework. And your xmlns:toolkit should reference a dll, not a http uri.
My problem was I was using RC version of Blend. So I advise you to check your VS2010, Blend and Silverlight version to make sure they're aligned.
bye

How do I include specific controls from System.Windows.Controls in my Silverlight app?

Microsoft has a handy reference of the various controls in the System.Windows.Controls namespace and which controls are included in the runtime.
For any controls listed here that aren't included in the runtime, you have to include the reference to the System.Windows.Controls assembly and select "copy local" in Visual Studio. So that's what I'm currently doing and it works.
However, by including this DLL I'm adding almost 80 KB to my XAP file (and my XAP file is only 110 KB). The only control I'm using that requires it is the GridSplitter. Is there a way to rebuild a condensed version of this assembly that includes the GridSplitter only?
It looks like I just found the answer for Silverlight 2...
Source Code for Silverlight 2 Runtime and SDK Controls
And I think that'll work for me for now. I should be able to go through the project and exclude all the unnecessary bits from the project and do a rebuild.
I'm still using Silverlight 2 but I will be switching to 3 in a couple months. And I can't seem to find the same thing for Silverlight 3. Maybe the source is not available yet for Silverlight 3?
UPDATE:
So I got this working after jumping through some hoops. At first I downloaded the source project from Microsoft and then just started removing stuff. But then I noticed that I couldn't build the solution. In fact I couldn't build an unmodified version of the solution either. I was getting errors about strong name verification. I tried unchecking strong name signing from the "Signing" section of the project properties but I got the same error. I even added the assembly to the strong name verification skip list and finally got past the error. But when I tried to include the new assembly in my Silverlight project and run it in a browser, I'd get a blank screen (the Silverlight control never loaded). I'm still not sure why but I'm sure I was missing something.
Finally I just created a fresh project. It seems I should've done this from the beginning. I just needed to create an empty C# Silverlight Class Library for the GridSplitter. Then I started adding the source files necessary for the GridSplitter to this project and then I set the namespace and assembly name to System.Windows.Controls. After building this project, and referencing it in my Silverlight app it finally worked. The result: a 60 KB savings.
I wrote a little more about this here:
http://regexhero.net/blog/2009/09/optimizing-silverlight-xap-file.html
In case anyone wants them, I've got 4 of the controls from the SDK right here...
http://www.silverlightxap.com/controls/tagged/silverlight-sdk

Resources