private void CheckHideStart_Checked(object sender, RoutedEventArgs e)
 {
     if (_running)
     {
         _startButton.HideElement();
     }
 }
        private void ApplyStyle()
        {
            // make taskbar transparent
            if (CheckTaskbarVisible.IsChecked == true)
            {
                // show the taskbar
                _taskbar.AccentPolicy.AccentState = Utility.AccentState.ACCENT_DISABLED;
                _taskbar.ApplyAccentPolicy();
            }
            else
            {
                // hide the taskbar
                _taskbar.AccentPolicy.AccentState = Utility.AccentState.ACCENT_INVALID_STATE;
                _taskbar.ApplyAccentPolicy();
            }

            // make sure the dummy taskbar maintains position
            _dummyTaskbar.Top    = _taskbar.GetTop();
            _dummyTaskbar.Width  = _taskBarWidth;
            _dummyTaskbar.Left   = (_taskbar.GetWidth() / 2) - _dummyTaskbar.Width / 2;
            _dummyTaskbar.Height = _taskbar.GetHeight();
            //_dummyTaskbar.Background = new SolidColorBrush(Color.FromArgb((byte)SliderDummyTaskOpacity.Value, 0, 0, 0));
            UpdateDummySliders();

            // get the offsets of buttons that may or may not be visible
            int offset = 0; // (_startButton.IsElementVisible() ? _startButton.GetWidth() : 0);

            for (int i = 0; i < 3; i++)
            {
                offset += _taskbarButtons[i].IsElementVisible() ? _taskbarButtons[i].GetWidth() : 0;
            }

            // resize the app container and then move it into position
            _mainAppContainer.ResizeElement((int)_dummyTaskbar.Width - _trayIconContainer.GetWidth() - offset - 32);
            _mainAppContainer.MoveElement((int)_dummyTaskbar.Left + offset + 32);

            // move the start button into position
            if (_startButton.IsElementVisible())
            {
                _startButton.MoveElement((int)_dummyTaskbar.Left);
            }

            // show or hide the show desktopbutton
            if (CheckHideShowDesk.IsChecked == true)
            {
                _showDesktopButton.HideElement();
            }
            else
            {
                _showDesktopButton.ShowElement();
            }

            // move taskbar buttons into position
            for (int i = 0; i < 3; i++)
            {
                if (_taskbarButtons[i].IsElementVisible())
                {
                    _taskbarButtons[i].MoveElement((int)_dummyTaskbar.Left + offset - (_taskbarButtons[i].GetWidth() * i));
                }
            }

            // move the start menu into the correct position
            if (_dummyTaskbar.Top == 0)
            {
                _startMenu.MoveElement((int)_dummyTaskbar.Left, (int)_dummyTaskbar.Height);
                _cortanaSearchMenu.MoveElement((int)_dummyTaskbar.Left, (int)_dummyTaskbar.Height);
            }
            else
            {
                _startMenu.MoveElement((int)_dummyTaskbar.Left);
                _cortanaSearchMenu.MoveElement((int)_dummyTaskbar.Left, (int)_dummyTaskbar.Top - (_cortanaSearchMenu.GetHeight()));
            }

            // move the tray icon container into position
            _trayIconContainer.MoveElement((int)_dummyTaskbar.Left + (int)_dummyTaskbar.Width - _trayIconContainer.GetWidth());
        }