Example #1
0
        public TaskbarButton(ApplicationViewModel applicationViewModel, TaskbarIconsSize iconsSize)
        {
            DataContext = applicationViewModel;
            InitializeComponent();

            Id = applicationViewModel.Application.Id;

            SetIconSize(iconsSize);
        }
        public TaskbarButton(ApplicationViewModel applicationViewModel, TaskbarIconsSize iconsSize)
        {
            DataContext = applicationViewModel;
            InitializeComponent();

            Id = applicationViewModel.Application.Id;

            SetIconSize(iconsSize);
        }
Example #3
0
        public void SetIconSize(TaskbarIconsSize newIconsSize)
        {
            int newSize = newIconsSize == TaskbarIconsSize.Large ? LargeIconSize : SmallIconSize;
            if (AppButton.Width != newSize)
            {
                AppButton.Width = newSize;
                Width = AppButton.Width + MarginSize;
            }

            if (AppButton.Height != newSize)
            {
                AppButton.Height = newSize;
                Height = AppButton.Height + MarginSize;
            }
        }
        public void SetIconSize(TaskbarIconsSize newIconsSize)
        {
            int newSize = newIconsSize == TaskbarIconsSize.Large ? LargeIconSize : SmallIconSize;

            if (AppButton.Width != newSize)
            {
                AppButton.Width = newSize;
                Width           = AppButton.Width + MarginSize;
            }

            if (AppButton.Height != newSize)
            {
                AppButton.Height = newSize;
                Height           = AppButton.Height + MarginSize;
            }
        }
        private void SetMainButtonIconSize(TaskbarIconsSize newIconsSize)
        {
            var newSize = (newIconsSize == TaskbarIconsSize.Small)
                                    ? MainIconSmallSize
                                    : MainIconLargeSize;

            if (MainButton.Height != newSize)
            {
                MainButton.Height = newSize;
            }

            if (MainButton.Width != newSize)
            {
                MainButton.Width = newSize;
            }
        }
        private void SetIconSize(TaskbarIconsSize newIconsSize)
        {
            if (CurrentIconSize != newIconsSize)
            {
                CurrentIconSize = newIconsSize;

                foreach (var taskbarButton in ButtonContainer.Children.OfType <TaskbarButton>())
                {
                    taskbarButton.SetIconSize(newIconsSize);
                }

                SetMainButtonIconSize(newIconsSize);

                NotifyTaskbarOfChange();
            }
        }
Example #7
0
        private void SetMainButtonIconSize(TaskbarIconsSize newIconsSize)
        {
            var newSize = (newIconsSize == TaskbarIconsSize.Small)
                                    ? MainIconSmallSize
                                    : MainIconLargeSize;

            if (MainButton.Height != newSize)
            {
                MainButton.Height = newSize;
            }

            if (MainButton.Width != newSize)
            {
                MainButton.Width = newSize;
            }
        }
Example #8
0
        private void SetIconSize(TaskbarIconsSize newIconsSize)
        {
            if (CurrentIconSize != newIconsSize)
            {
                CurrentIconSize = newIconsSize;

                foreach (var taskbarButton in ButtonContainer.Children.OfType<TaskbarButton>())
                {
                    taskbarButton.SetIconSize(newIconsSize);
                }

                SetMainButtonIconSize(newIconsSize);

                NotifyTaskbarOfChange();
            }
        }