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:
- namespace AddInProjectService1
- {
- /// <summary>
- /// Description of Project Service Extension.
- /// </summary>
- [AddInExtension("Your Project Service Extension Name", "Your Project Service Extension Description", DefaultStartMode = DefaultStartupModes.Auto)]
- public class ProjectServiceExtension : IProjectServiceExtension
- {
- #region IProjectServiceExtension implementation
- public void Start(IProject context, IBehavior behavior)
- {
- // enter your code which should be executed when starting the service for the SCADA Service Engine
- var frame = context.FrameCollection["Overview"];
- if (frame != null)
- {
- frame.Width = 3840; // before is 1920
- frame.Save();
- }
- }
- public void Stop()
- {
- // enter your code which should be executed when stopping the service for the SCADA Service Engine
- }
- #endregion
- }
- }
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.