Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CSDeskBandWin"/> class.
 /// </summary>
 public CSDeskBandWin()
 {
     Options.Title = RegistrationHelper.GetToolbarName(GetType());
     _impl         = new CSDeskBandImpl(this);
     _impl.Closed += (o, e) => DeskbandOnClosed();
     TaskbarInfo   = _impl.TaskbarInfo;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CSDeskBandWpf"/> class.
        /// </summary>
        public CSDeskBandWpf()
        {
            Options.Title = RegistrationHelper.GetToolbarName(GetType());

            var hwndSourceParameters = new HwndSourceParameters("Deskband host for wpf")
            {
                TreatAsInputRoot = true,
                WindowStyle      = unchecked ((int)(WindowStyles.WS_VISIBLE | WindowStyles.WS_POPUP)),
                HwndSourceHook   = HwndSourceHook,
            };

            HwndSource            = new HwndSource(hwndSourceParameters);
            _rootVisual           = new AdornerDecorator();
            HwndSource.RootVisual = _rootVisual;
            HwndSource.CompositionTarget.BackgroundColor = Colors.Transparent;

            _impl = new CSDeskBandImpl(this);

            _impl.Closed += (o, e) => DeskbandOnClosed();
            TaskbarInfo   = _impl.TaskbarInfo;
        }