Пример #1
0
 public DwmFramelessController(FramelessInfo framelessInfo, FramelessOption framelessOption, Action <SizeChangedEventArgs> onSizeChanged)
 {
     _windowHandle    = framelessInfo.Handle;
     _framelessInfo   = framelessInfo;
     _framelessOption = framelessOption;
     _dragWindowInfo  = new DragWindowInfo(framelessInfo.Handle, _framelessOption);
     _onSizeChanged   = onSizeChanged;
 }
Пример #2
0
        protected override void OnCreated(IntPtr hWnd)
        {
            base.OnCreated(hWnd);

            _options.WindowFrameless = true;
            _framelessInfo           = new FramelessInfo(hWnd);
            _framelessOption         = _options.FramelessOption;
            _dwmFramelessController  = new DwmFramelessController(_framelessInfo, _framelessOption, HandleSizeChanged);

            _dwmFramelessController.HandleCompositionchanged();
            _dwmFramelessController.HandleThemechanged();
        }
Пример #3
0
        protected override void OnCreated(IntPtr hWnd)
        {
            base.OnCreated(hWnd);

            if (_options.Fullscreen || _options.KioskMode)
            {
                throw new NotSupportedException("Fullscreen/Kiok mode is not supported in ChromelyFramelessApp. Please use ChromelyBasicApp instead.");
            }

            _options.WindowFrameless = true;
            _framelessInfo           = new FramelessInfo(hWnd);
            _framelessOption         = _options.FramelessOption;
            _dwmFramelessController  = new DwmFramelessController(_framelessInfo, _framelessOption, HandleSizeChanged);

            _dwmFramelessController.HandleCompositionchanged();
            _dwmFramelessController.HandleThemechanged();
        }
Пример #4
0
 public ChromelyWinFramelessHost()
 {
     _framelessInfo   = new FramelessInfo(IntPtr.Zero);
     _framelessOption = new FramelessOption();
 }