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

Exceptions in Designer after switching to RibbonView from RibbonBar

8 Answers 113 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 17 Jan 2012, 07:25 PM
I am getting the following exception in VS 2010 SP1 if I use RadRibbonTab in the XAML in my user controls.

System.ArgumentException
Property 'Items' was not found in the property collection 'Grid'.
   at MS.Internal.VirtualModel.VirtualModelPropertyCollection.Find(String name, Boolean throwOnError)
   at Microsoft.Windows.Design.Model.ModelMemberCollection`2.get_Item(String name)
   at Telerik.Windows.Controls.RibbonView.Design.RibbonTabAdornerProvider.GetHorizontalOffset()
   at Telerik.Windows.Controls.RibbonView.Design.RibbonTabAdornerProvider.<PopulateSmartTagPanes>b__3()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

I can usually click the reload designer link and it will render - until I make additional changes.  Another interesting problem that is possibly related:  If I don't specify a height on the RadRibbonTab, all of my XAML gets a wavy blue underline.

Throughout all of this the application works perfectly fine.  I just lose some of the functionality (i.e. viewing properties and events) when the designer is not working.

I work on this project with one other programmer.  It is doing the same thing for him so I cannot rule out some sort of project/solution corruption.

The references to RibbonBar appear to be removed and this is the information I have on the RibbonView:

Assembly Telerik.Windows.Controls.RibbonView
    C:\Program Files (x86)\Telerik\RadControls for Silverlight Q3 2011\Binaries\Silverlight\Telerik.Windows.Controls.RibbonView.dll
2011.3.1220.1040
v2.0.50727

Any suggestions to try to troubleshoot this would be appreciated. 

-Randy

8 Answers, 1 is accepted

Sort by
0
Randy
Top achievements
Rank 1
answered on 19 Jan 2012, 07:41 AM
Anyone have any ideas?
0
Tina Stancheva
Telerik team
answered on 20 Jan 2012, 02:22 PM
Hi Randy,

We haven't received such reports and this is why we are also not sure what might be causing this exception. Can you please elaborate further on your scenario and the definition of the RadRibbonView control in your application?

I also attached a sample RadRibbonView project that I used to test your issue. On our side it works as expected and there are no exceptions in the designer. Can you try it on your side and let me know if it reproduces the exception. If it doesn't can you please modify it to better illustrate your scenario. If we manage to reproduce the issue on our side, we'll be able to further investigate it and this is why your assistance in this case is highly appreciated.

Thank you in advance for your cooperation.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Randy
Top achievements
Rank 1
answered on 22 Jan 2012, 04:58 AM
Thanks for the reply. 

I am actually just using a RadRibbonTab that is not embedded in a RadRibbonView. In code behind when my control is created I add that RadRibbonTab to a RadRibbonView in my main form as a contextual tab. This was working fine when I was using RadRibbonBar.

Here is a sample to reproduce that error

<UserControl x:Class="Test.MainPage"
    mc:Ignorable="d"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit">
     
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadRibbonTab>
 
        </telerik:RadRibbonTab>
    </Grid>
</UserControl>
0
Randy
Top achievements
Rank 1
answered on 25 Jan 2012, 01:25 AM
Anyone?  It is real easy to reproduce this issue.
0
Tina Stancheva
Telerik team
answered on 25 Jan 2012, 03:29 PM
Hi Randy,

I am not sure how to go about reproducing the issue. You say that you add the tab as a contextual tab in code behind when a control is created. However, I am not sure which part of the UserControl that contains the RibbonTab you add as a contextual tab. Basically I am not sure what is your code behind logic that adds the tab as a contextual tab, can you modify the sample I attached above to demonstrate it, or send us a code snippet to better understand your scenario?

Also, in the RadRibbonView control we changed the way the contextual groups and tabs are defined. Can you please have a look at this article to make sure your approach works with the RadRibbonView contextual groups/tabs structure.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Randy
Top achievements
Rank 1
answered on 25 Jan 2012, 08:52 PM
To recreate this all you need to do is create a new solution and add just a RadRibbonTab (without the RadRibbonView).  No additional code needed.
0
Tina Stancheva
Telerik team
answered on 30 Jan 2012, 12:47 PM
Hello Randy,

Please accept my apology for the delay, we managed to reproduce the issue on our side. However, as we will need more time to investigate the case and find the cause for both exceptions that are raised by the VS designer, I logged the issue as a bug in our PITS. You can track the progress of the item and vote for it in order to increase its priority. I also updated your Telerik account for reporting this.

Also on our side these exceptions are only raised by the VS designer and the application works as expected in run-time. This is why I wanted to ask you if the application runs as expected on your side and if these issues are a show stopper for you.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Randy
Top achievements
Rank 1
answered on 30 Jan 2012, 08:43 PM
Thanks for the reply Tina.  It is only affecting the designer and not run-time.  So it is certainly not a show stopper for me.

It is just annoying as my entire application is setup with the RadRibbonTab in each page without the RadRibbonView.  Finding properties and methods to use in XAML is more difficult this way.

-Randy
Tags
RibbonView and RibbonWindow
Asked by
Randy
Top achievements
Rank 1
Answers by
Randy
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or