Local Properties Not Recognized in VS2012

10 posts, 0 answers
  1. Aaron
    Aaron avatar
    29 posts
    Member since:
    May 2011

    Posted 19 Feb 2013 Link to this post

    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
  2. Aaron
    Aaron avatar
    29 posts
    Member since:
    May 2011

    Posted 19 Feb 2013 Link to this post

    By the way, I'm using the latest update of Visual Studio Pro 2012 on Windows 8 Pro (64 bit).

    Thanks.
  3. DevCraft banner
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 20 Feb 2013 Link to this post

    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.

  5. Aaron
    Aaron avatar
    29 posts
    Member since:
    May 2011

    Posted 20 Feb 2013 Link to this post

    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.
  6. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 20 Feb 2013 Link to this post

    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.

  7. Aaron
    Aaron avatar
    29 posts
    Member since:
    May 2011

    Posted 20 Feb 2013 Link to this post

    Sure thing.  I'm using Silverlight 5 with RadControls for Silverlight Q3 2012 (2012.3.1129.1050).

    Thanks
  8. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 21 Feb 2013 Link to this post

    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.

  9. Matthias Bibo
    Matthias Bibo avatar
    72 posts
    Member since:
    Mar 2010

    Posted 28 May 2013 Link to this post

    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.








  10. Yoan
    Admin
    Yoan avatar
    1066 posts

    Posted 31 May 2013 Link to this post

    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.

  11. Matthias Bibo
    Matthias Bibo avatar
    72 posts
    Member since:
    Mar 2010

    Posted 02 Oct 2013 Link to this post

    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.

Back to Top
DevCraft banner