Hello Frederico,
Thank you for writing back.
This appears to be a layout issue in the
AppointmentElement which is present when it has only one child element added (in the current case this is the
StackLayoutPanel). I have logged it to
PITS and we will address it in a future release. Here is the
link to the PITS item. To workaround this issue, you just need to add a second empty child to the
AppointmentElement:
void radScheduler1_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e)
{
if (e.AppointmentElement.Children.Count > 0)
{
return;
}
RadButtonElement button = new RadButtonElement();
button.Text = "Report";
button.Tag = e.Appointment;
button.StretchHorizontally = button.StretchVertically = false;
button.Alignment = ContentAlignment.BottomRight;
button.Click += new EventHandler(button_Click);
RadButtonElement button2 = new RadButtonElement();
button2.Text = "Report2";
button2.Tag = e.Appointment;
button2.StretchHorizontally = button2.StretchVertically = false;
button2.Alignment = ContentAlignment.BottomRight;
button2.Click += new EventHandler(button_Click);
StackLayoutPanel stack = new StackLayoutPanel();
stack.Orientation = Orientation.Horizontal;
stack.StretchHorizontally = stack.StretchVertically = false;
stack.Alignment = ContentAlignment.BottomRight;
stack.Children.Add(button);
stack.Children.Add(button2);
e.AppointmentElement.Children.Add(stack);
e.AppointmentElement.Children.Add(new StackLayoutPanel());
}
Your Telerik points have been updated for bringing this issue to our attention. Should you have any future questions, do not hesitate to contact us.
All the best,
Ivan Todorov
the Telerik team
SP1 of
Q3’11 of RadControls for WinForms is available for
download (see
what's new).