none
Resizing Custom pane in outlook 2013 beyond a point, hangs RRS feed

  • Question

  • We are getting an issue in outlook 2013 with one of our VSTO Add-ins. When we try to expand the custom task pane beyond a point, it hangs and the Ribbon buttons are not active. Is there any way to set the maximum width of the custom pane in the properties or programmatically. If I try to set the maximum width, still the custom pane can be expanded and if I send ESC key press while resizing beyond this point, the mail closes.
    Wednesday, February 15, 2017 3:51 AM

All replies

  • Hi,                                                                                                                                                                                                            

    You could check width of the custom pane whenever the width changes,

    If the width beyonds the maximum you set,than you could change it to the maximum.

    We can write code in CustomTaskPane.Control.SizeChanged because it can response with width changing.

    Customize method:

     

    taskPane.Control.SizeChanged += newEventHandler(Control_SizeChanged);

     

    Here is the method

     

    privatevoidControl_SizeChanged(objectsender, EventArgse)

            {

                if(taskPane.Width > 500)

                {

                    taskPane.Width = 500;

                }

            }

     

    My project built based on the code in the link.

    Custom Task Panes in outlook

    Here are some links about custom task pane

    CustomTaskPane Interface

    CustomTaskPane.Width Property

    CustomTaskPane.Control Property

     

    Hope that can help you.

    Friday, February 17, 2017 2:35 AM