RadSheduleView InvalidDesignerUpdateException

10 posts, 1 answers
  1. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 23 Feb 2011 Link to this post

    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.
  2. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 23 Feb 2011 Link to this post

    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>

  3. DevCraft banner
  4. Answer
    Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 25 Feb 2011 Link to this post

    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!
  5. XamlmaX2
    XamlmaX2 avatar
    31 posts
    Member since:
    Jul 2012

    Posted 25 Feb 2011 Link to this post

    Could you provide a URL to the latest beta please?
    Thanks
  6. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 25 Feb 2011 Link to this post

    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!
  7. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 27 Feb 2011 Link to this post

    Thanks I'll give it a try...
    John.
  8. Oscar Wahlen
    Oscar Wahlen avatar
    33 posts
    Member since:
    Mar 2010

    Posted 31 Mar 2011 Link to this post

    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"
  9. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 04 Apr 2011 Link to this post

    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
  10. Oscar Wahlen
    Oscar Wahlen avatar
    33 posts
    Member since:
    Mar 2010

    Posted 08 Apr 2011 Link to this post

    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.
  11. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 12 Apr 2011 Link to this post

    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
Back to Top
DevCraft banner