/// <summary> /// Handles the Resize event of the renderControl control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> void RenderControlResize(object sender, System.EventArgs e) { try { RenderTarget2D.Resize(new Size2(renderControl.Size.Width, renderControl.Size.Height)); CurrentTextLayout.MaxWidth = renderControl.Size.Width; CurrentTextLayout.MaxHeight = renderControl.Size.Height; } catch (Exception ex) { LogException(ex); } }
/// <summary> /// Handles the Resize event of the renderControl control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> void RenderControlResize(object sender, System.EventArgs e) { try { RenderTarget2D.Resize(ClientRectangle.Size); CurrentTextLayout.MaxWidth = ClientRectangle.Size.Width; CurrentTextLayout.MaxHeight = ClientRectangle.Size.Height; } catch (Exception ex) { LogException(ex); } }
/// <summary> /// Handles the Resize event of the renderControl control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> void renderControl_Resize(object sender, EventArgs e) { try { RenderTarget2D.Resize(renderControl.Size); CurrentTextLayout.MaxWidth = renderControl.Size.Width; CurrentTextLayout.MaxHeight = renderControl.Size.Height; Refresh(); } catch (Exception ex) { LogException(ex); } }