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

Local Properties Not Recognized in VS2012

9 Answers 122 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 19 Feb 2013, 11:06 PM
Hi,

I'm getting an Invalid Markup error in the design view for my UserControls.  The Error List shows several instances of the following error.

The local property "____" can only be applied to types that are derived from "DataControl".

There is an instance of this error for each of the following RadGridView properties.

  • CanUserSelect
  • ItemsSource
  • SelectionChanged

Also, in the code-behind, these properties don't show up in intellisense for the RadGridView.  The design view for all of my UserControls is giving me this Invalid Markup message and I'm getting errors of the same form shown above for other controls.

The solution was created in VS2010 and I haven't changed any of the DLL references since then, so I don't believe the DLLs are the issue.  Could something be wrong with my VS2012 configuration?


Thanks very much,
Aaron

9 Answers, 1 is accepted

Sort by
0
Aaron
Top achievements
Rank 1
answered on 19 Feb 2013, 11:10 PM
By the way, I'm using the latest update of Visual Studio Pro 2012 on Windows 8 Pro (64 bit).

Thanks.
0
Vlad
Telerik team
answered on 20 Feb 2013, 07:06 AM
Hello,

 Can you try to clean and rebuild the solution?

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Aaron
Top achievements
Rank 1
answered on 20 Feb 2013, 04:47 PM
Hi Vlad,

Yes, I've tried that.  After a Clean and Rebuild I get the same errors.  I restarted VS after the Rebuild and instead of "Invalid Markup" I get a XamlParseException:

A value of type 'GridViewTableDefinition' cannot be added to a collection or dictionary of type 'TableDefinitionCollection'.

This is the code:

<telerik:RadGridView.ChildTableDefinitions>
    <telerik:GridViewTableDefinition/>
</telerik:RadGridView.ChildTableDefinitions>


I Clean and Rebuild the solution again and the original errors come back (mentioned in my first post).  Actually now I'm getting the following error as well.

The local property "AnimationName" can only be applied to types that are derived from "RadAnimation".

That error is being thrown by a TreeViewExpandCollapseAnimation control.  I see in the online documentation that this control is in fact derived from RadAnimation.  It seems like the compiler isn't finding the inherited classes of these controls for some reason.
0
Vlad
Telerik team
answered on 20 Feb 2013, 04:55 PM
Hi,

Can you post your Silverlight and our assemblies versions?

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Aaron
Top achievements
Rank 1
answered on 20 Feb 2013, 06:29 PM
Sure thing.  I'm using Silverlight 5 with RadControls for Silverlight Q3 2012 (2012.3.1129.1050).

Thanks
0
Vlad
Telerik team
answered on 21 Feb 2013, 06:41 AM
Hello,

 Please open support ticket and send us small example project demonstrating the issue.

All the best,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Matthias Bibo
Top achievements
Rank 1
answered on 28 May 2013, 02:29 PM
Hi,

I migrated from VS2010 to VS2012 and encounter the same problem.
 Many usercontrol get not rendered, although they got rendered in VS2010.
I think its a issue in the odd Blend designer in VS2012.

<bdlControls:BDLGridView Grid.Row="2" Grid.Column="0" Margin="0,2,0,2" SelectionChanged="ListboxAlle_SelectionChanged" SelectionUnit="FullRow" SelectionMode="Multiple" x:Name="ListboxAusgewaehlt" ItemsSource="{Binding FilteredWerteListeAusgewaehlt}" utils:BDLGridViewExtensions.SelectedItems="{Binding SelectedWertListeAusgewaehlt, Mode=TwoWay}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Foreground="Green" AutoGenerateColumns="False" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" IsReadOnly="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">


Fehler 5 Die lokale SelectionUnit-Eigenschaft kann nur auf Typen angewendet werden, die von "GridViewDataControl" abgeleitet sind. C:\Develop\dialog5\trunk\Silverlight\DialogCrm\UserControls\BenutzergruppenZuordnungsControl.xaml 70 136 DialogCrm

Fehler 51 Die lokale SelectedItem-Eigenschaft kann nur auf Typen angewendet werden, die von "DataControl" abgeleitet sind. C:\Develop\dialog5\trunk\Silverlight\DialogCrm\UserControls\BDLTaskManagerControl.xaml 84 473 DialogCrm

It does not happen in all controls (some others which looks nearly the same work) and it comes sometimes randomly.
 When the designer does not render a control it does not render all other controls.

It does not happen in all controls (some others which looks nearly the same work) and it comes sometimes randomly.
When the designer throws the error and stops to render one control, many others also fail (which got rendered before).
It seems, that the designer mixes something up internally.

When I make a reprocase everything worked fine, so I´m stuck.








0
Yoan
Telerik team
answered on 31 May 2013, 02:35 PM
Hi,

Currently we are not aware of such an issue. May I ask you to share what binaries have you referenced - the regular ones or the NoXaml ones? Where have you referenced them from? What is the result if you add a folder with the binaries to the project and reference them from there?

However, I would suggest you to try something simple. Once, you have referenced the right assemblies, you can Clean and then Rebuild the project/solution. Sometimes this helps to resolve the designer's errors and I hope that in your case will be that way.


Regards,
Yoan
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Matthias Bibo
Top achievements
Rank 1
answered on 02 Oct 2013, 02:25 PM
We found out, this is not an Telerik issue, but an issue with the "new" blend designer from VS2012.
After cleaning my references in the solution (checked all version numbers and ) and removed unused, it mostly runs.
I had one assembly which had an old versionumber (Silverlight 4).

When the erros occurs again, I clean the ShadowCache from the designer, and the it will work until the cache from the designer out of sync again and needs to be cleaned.

Tags
GridView
Asked by
Aaron
Top achievements
Rank 1
Answers by
Aaron
Top achievements
Rank 1
Vlad
Telerik team
Matthias Bibo
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or