Hello!
In my application I have a ListBox and RadScheduleView. I can create a new appointment by drag'n'drop from ListBox. Default duration for new appointment is 1 hour.
I have a
ScheduleViewDragDropBehavior class and I tried to set End property for new appoinment here, but Start and End properties are equal 1000/01/01.
public
class
ScheduleViewDragDropBehavior : Telerik.Windows.Controls.ScheduleViewDragDropBehavior
{
public
override
IEnumerable<IOccurrence> ConvertDraggedData(
object
data)
{
if
(DataObjectHelper.GetDataPresent(data,
typeof
(Campaign),
false
))
{
var campaigns = DataObjectHelper.GetData(data,
typeof
(Campaign),
true
)
as
IEnumerable;
if
(campaigns !=
null
)
{
var appCollection = campaigns.OfType<Campaign>().Select(c =>
new
AppointmentCampaign { Subject = c.Name, Campaign = c, Category =
new
Category(
""
, c.Brush) });
return
appCollection;
}
}
return
base
.ConvertDraggedData(data);
}
}
So, how can I change default duration?