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

RadSheduleView InvalidDesignerUpdateException

9 Answers 210 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Jonx
Top achievements
Rank 2
Jonx asked on 23 Feb 2011, 02:33 PM
Hello,
I've started using the RadSheduleView control.
I'm using it in a usercontrol. Something very simple.
And while the application is working at runtime I get an InvalidDesignerUpdateException :

System.ArgumentException
Value does not fall within the expected range.
   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
   at MS.Internal.XcpImports.UIElement_UpdateLayout(UIElement element)
   at Microsoft.Windows.Design.Platform.SilverlightViewProducer.OnViewUpdated()

Microsoft.Windows.Design.Platform.InvalidDesignerUpdateException
An unhandled exception was encountered while trying to render the current silverlight project on the design surface. To diagnose this failure, please try to run the project in a regular browser using the silverlight developer runtime.

For now the structure of my project is very simple.
I have a main page holding my planning control in a tab item.
<telerik:RadTabItem x:Name="pagPlanning" Visibility="Collapsed">
                            <ContentControl HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <my1:PlanningPage />
                            </ContentControl>
                        </telerik:RadTabItem>

And then my control:
<UserControl x:Class="Ogaca.Views.PlanningPage"
    xmlns:effects="clr-namespace:Telerik.Windows.Controls.TransitionEffects;assembly=Telerik.Windows.Controls"
    xmlns:my="clr-namespace:Jkn.Web"
    xmlns:app="clr-namespace:Jkn"                         
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
        <telerik:RadScheduleView>
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition />
                <telerik:WeekViewDefinition />
                <telerik:TimelineViewDefinition />
                <telerik:MonthViewDefinition />
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
</UserControl>
No viewmodel, no data, nothing.
I removed everything to make sure it's only the ScheduleView causing the problem. Maybe it's a known issue.

The design view for the usercontrol gives me the exception but the main page holding the control does display correctly.
Anyway, just wanted to let you know,
John.

9 Answers, 1 is accepted

Sort by
0
Jonx
Top achievements
Rank 2
answered on 23 Feb 2011, 02:52 PM
I'm not sure if I'm using the control correctly but I get the following error when trying to use a Resource:
The tag 'Resource' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'

I need to add the assembly explicitly to make it work:
xmlns:telerikScheduler="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"     

and 
<telerik:RadScheduleView AppointmentsSource="{Binding Appointments}">
    <telerik:RadScheduleView.ResourceTypesSource>
        <telerik:ResourceTypeCollection>
            <telerik:ResourceType Name="People">
                <telerikScheduler:Resource ResourceName="Mathias" />
                <telerikScheduler:Resource ResourceName="Hélène" />
                <telerikScheduler:Resource ResourceName="Ornella" />
            </telerik:ResourceType>
        </telerik:ResourceTypeCollection>
    </telerik:RadScheduleView.ResourceTypesSource>
    <telerik:RadScheduleView.ViewDefinitions>
        <telerik:DayViewDefinition MinorTickLength="15min" MajorTickLength="1h" />
        <telerik:WeekViewDefinition />
        <telerik:TimelineViewDefinition />
        <telerik:MonthViewDefinition />
    </telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>

0
Accepted
Hristo
Telerik team
answered on 25 Feb 2011, 09:18 AM
Hi John,

I think that this error is caused by the fact that we have Resource class in both Controls assembly and in ScheduleView assembly and in XAML there is no way for the parser to know which type to instantiate (because both are in the telerik URI namespace).
We have fixed this issue by removing the Resource class from Controls assembly so if you try it with the latest beta (or LIB) you should not have such problem.

Sorry for the caused inconvenience.

Kind regards,
Hristo
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
XamlmaX2
Top achievements
Rank 1
answered on 25 Feb 2011, 04:51 PM
Could you provide a URL to the latest beta please?
Thanks
0
Valeri Hristov
Telerik team
answered on 25 Feb 2011, 05:08 PM
Hello John,

The links are in the following forum thread:
http://www.telerik.com/community/forums/silverlight/scheduleview/radscheduleview-for-silverlight-pre-beta-release-is-here.aspx

Regards,
Valeri Hristov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jonx
Top achievements
Rank 2
answered on 27 Feb 2011, 07:24 PM
Thanks I'll give it a try...
John.
0
Oscar Wahlen
Top achievements
Rank 1
answered on 31 Mar 2011, 11:14 AM
I am still getting this exception in Visual Studio 2010 SP1 and RadControls for Silverlight 4 2011.1.0315.

When I start a new Silverlight project and drag the RadScheduleView control in the designer for the first time everything seems fine.

The XAML is shown below:

<UserControl x:Class="MySv.MainPage"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
  
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadScheduleView>
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition />
                <telerik:WeekViewDefinition />
                <telerik:MonthViewDefinition />
                <telerik:TimelineViewDefinition />
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
    </Grid>
</UserControl>

However when I rebuild the solution Visual Studio throws the InvalidDesignerUpdateException.

To solve this issue I had to remove the design height and width properties, rebuild the solution and reload the Visual Studio designer.

d:DesignHeight="300" d:DesignWidth="400"
0
Valeri Hristov
Telerik team
answered on 04 Apr 2011, 08:07 AM
Hi Oscar,

Thanks for the tip! What happens if you move the xmlns:telerik line above the d:Width and d:Height attributes? Do you still get the same error?

Best wishes,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Oscar Wahlen
Top achievements
Rank 1
answered on 08 Apr 2011, 07:51 AM
Same result. I did however notice it also had something to do with the view definitions. After removing the view definitions from my XAML code everything seems fine again. I can't have both the DesignHeight/DesignWidth properties and view definitions in my XAML code at the time.
0
Valeri Hristov
Telerik team
answered on 12 Apr 2011, 09:25 AM
Hello Oscar,

We fixed the problem with x:DesignWidth/Height, the fix will be available in the upcoming service pack this week.

Kind regards,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ScheduleView
Asked by
Jonx
Top achievements
Rank 2
Answers by
Jonx
Top achievements
Rank 2
Hristo
Telerik team
XamlmaX2
Top achievements
Rank 1
Valeri Hristov
Telerik team
Oscar Wahlen
Top achievements
Rank 1
Share this question
or