Example #1
0
        /// <summary>
        /// Strictly adds a layout</summary>
        /// <param name="windowLayoutService">Window layout service</param>
        /// <param name="newLayoutName">New layout name</param>
        /// <param name="dockState">Dock state</param>
        /// <remarks>
        /// Used to add default layouts.
        /// Requires the implementor of IWindowLayoutService to implement:
        /// void AddLayout(string newLayoutName, object dockState)</remarks>
        public static void AddLayout(this IWindowLayoutService windowLayoutService, string newLayoutName, object dockState)
        {
            MethodInfo method = windowLayoutService.GetType().GetMethod("AddLayout");
            var        args   = new object[] { newLayoutName, dockState };

            method.Invoke(windowLayoutService, args);
        }