Sizing of custom edit appointment dialog (template)

2 posts, 0 answers
  1. Jacques
    Jacques avatar
    3 posts
    Member since:
    Sep 2011

    Posted 18 Nov 2011 Link to this post

    Hi,

    I have a custom edit appointment template which contains some controls that are made visible / collapsed based on certain selected criteria within the dialog. Unlike a normal window, the edit appointment dialog doesn't automatically resize while it's open. Is there a property or something that I can use to control this behaviour? Maybe changing the window style from a non resizeable toolbox window to one that is resizeable?

    I am aware that I can use another 'factory' way of creating a custom appointment dialog as shown in the following post, but this means that I also have to implement a custom confirmation dialog, etc. and I would prefer not to have to do that.

    http://blogs.telerik.com/blogs/posts/11-11-04/the-lob-chronicles-episode-13-extending-radscheduleview.aspx

    Thanks!
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 23 Nov 2011 Link to this post

    Hi Jacques,

    You can customize only the EditAppointmentDialog using the IScheduleViewDialogHostFactory and and IScheduleViewDialogHost interfaces as explained here.

    For example, to set the Width, Height and ResizeMode of the EditAppointmentDialog, please use the following snippet:

    public class CustomScheduleViewDialogHostFactory : ScheduleViewDialogHostFactory
    {
        protected override IScheduleViewDialogHost CreateNew(ScheduleViewBase scheduleView, DialogType dialogType)
        {
            var host = base.CreateNew(scheduleView, dialogType);
            var window = host as RadWindow;
     
            if (dialogType == DialogType.AppointmentDialog)
            {
                window.ResizeMode = ResizeMode.CanResize;
                window.Width = 800;
                window.Height = 600;
            }          
            return host;
        }
    }

    Hope this helps.

    Best wishes,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top