Change Frame Size

Change Frame Size

I am trying to dynamically change the frame size in my SCADA project. One of the solutions I attempted is using an add-in with the following code:
  1. namespace AddInProjectService1
  2. {
  3.     /// <summary>
  4.     /// Description of Project Service Extension.
  5.     /// </summary>
  6.     [AddInExtension("Your Project Service Extension Name", "Your Project Service Extension Description", DefaultStartMode = DefaultStartupModes.Auto)]
  7.     public class ProjectServiceExtension : IProjectServiceExtension
  8.     {
  9.         #region IProjectServiceExtension implementation

  10.         public void Start(IProject context, IBehavior behavior)
  11.         {
  12.             // enter your code which should be executed when starting the service for the SCADA Service Engine
  13.             var frame = context.FrameCollection["Overview"];

  14.             if (frame != null)
  15.             {
  16.                 frame.Width = 3840; // before is 1920
  17.                 frame.Save();
  18.             }
  19.         }

  20.         public void Stop()
  21.         {
  22.             // enter your code which should be executed when stopping the service for the SCADA Service Engine
  23.         }

  24.         #endregion
  25.     }
  26. }

However, the frame width does not change when running the project. Do you have a better approach for dynamically modifying the frame size? Or is there an alternative solution to achieve this?

Looking forward to your guidance.