コード例 #1
0
        /// <summary>
        /// The get window styles.
        /// </summary>
        /// <param name="state">
        /// The state.
        /// </param>
        /// <returns>
        /// The <see cref="Tuple"/>.
        /// </returns>
        private Tuple <WindowStyles, WindowExStyles, ShowWindowCommands> GetWindowStyles(WindowCreationStyle customCreationStyle, WindowState state)
        {
            var styles   = customCreationStyle.WindowStyles;
            var exStyles = customCreationStyle.WindowExStyles;

            switch (state)
            {
            case WindowState.Normal:
                return(new Tuple <WindowStyles, WindowExStyles, ShowWindowCommands>(styles, exStyles, ShowWindowCommands.SW_SHOWNORMAL));

            case WindowState.Maximize:
                return(new Tuple <WindowStyles, WindowExStyles, ShowWindowCommands>(styles, exStyles, ShowWindowCommands.SW_SHOWMAXIMIZED));

            case WindowState.Fullscreen:
                return(new Tuple <WindowStyles, WindowExStyles, ShowWindowCommands>(styles, exStyles, ShowWindowCommands.SW_SHOWMAXIMIZED));
            }

            return(new Tuple <WindowStyles, WindowExStyles, ShowWindowCommands>(styles, exStyles, ShowWindowCommands.SW_SHOWNORMAL));
        }
コード例 #2
0
        public static ChromelyConfiguration WithHostCustomStyle(this ChromelyConfiguration configuration, WindowCreationStyle customStyle)
        {
            if (configuration != null)
            {
                configuration.HostCustomCreationStyle = customStyle;
            }

            return(configuration);
        }