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

Appointment sample data crashes Blend designer

1 Answer 55 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Philipp
Top achievements
Rank 1
Philipp asked on 02 Nov 2011, 09:39 PM
I installed RADControls on my system today in order to evaluate the ScheduleView, and I just can't get any sample data into Blend. I ended up creating a simplistic view model that just exposes an ObservableCollection<IAppointment> and the generated sample data still causes the designer to crash with a null reference exception. I then copied the data from the demos into the file, but with the same result, so for now, I'm at a loss.

Thanks for your advice
Philipp

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 07 Nov 2011, 09:06 AM
Hi Philipp,

Expression Blend will not respect data bindings for its design-time. It will not display sample data unless that data is declaratively set. So to be able to see the active view as well as some sample appointments, waht you can do is declare the sample data in xaml.

Please, consider the following example:

<telerik:RadScheduleView Margin="0,24,0,26">
  
            <telerik:RadScheduleView.AppointmentsSource>
                <scheduleView:ObservableAppointmentCollection>
                    <scheduleView:Appointment Subject="Introduction to WCF RIA Services for Silverlight 4 Developers"
            Start="11/07/2011 12:00AM" End="11/07/2011 2:00AM"/>
                    <scheduleView:Appointment Subject="What's New in WCF 4" Start="11/07/2011 3:00AM" End="11/07/2011 4:00AM"/>
                    <scheduleView:Appointment Subject="Building RESTful Applications with the Open Data Protocol "
            Start="11/07/2011 6:00AM" End="11/07/2011 7:00AM"/>
                </scheduleView:ObservableAppointmentCollection>
            </telerik:RadScheduleView.AppointmentsSource>
  
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition/>
                <telerik:WeekViewDefinition/>
                <telerik:MonthViewDefinition/>
                <telerik:TimelineViewDefinition/>
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>

If the design-time surface does not auto-update right away, simply rebuild the project  so that the design-time can recreate the visible objects.

I hope this will be helpful.

Greetings,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ScheduleView
Asked by
Philipp
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or