public OptionsPanel( TaskPanel taskpanel) { this.Orientation = Orientation.Vertical; this.Width = Dimensions.GetWidth() * 0.27; this.Height = Dimensions.GetHeight() * 0.8; this.Background = ThemeSelector.GetBackground(); _sortingPU = new SortingPopUp(Dimensions.GetWidth() * 0.3, Dimensions.GetHeight() * 0.5, "Sorting options"); _sortingPU.Hide(); _taskPanel = taskpanel; _sortButton = new DefaultButton("Sort",this.Width/2,this.Height/20, new System.Windows.Thickness(0,20,0,0),new System.Windows.Thickness(0,0,0,0),HorizontalAlignment); _sortButton.MouseDown += _sortButton_MouseDown; _showDoneButton = new DefaultButton(this.GetShowDoneContent(), this.Width / 2, this.Height / 20, new System.Windows.Thickness(0, 20, 0, 0), new System.Windows.Thickness(0, 0, 0, 0), HorizontalAlignment); _showDoneButton.MouseDown += _showDoneButton_MouseDown; this.Children.Add(_sortButton); this.Children.Add(_showDoneButton); _sortingPU._sortImportanceButton.MouseDown += _sortImportanceButton_MouseDown; _sortingPU._sortStateButton.MouseDown += _sortStateButton_MouseDown; _sortingPU._sortCreationButton.MouseDown += _sortCreationButton_MouseDown; }
private void SetUpButtons() { _changeColor = new DefaultButton("Change accent color", Dimensions.GetWidth() * 0.3, Dimensions.GetHeight() * 0.07, new System.Windows.Thickness(0, 30, 0, 30), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center); _changeColor.MouseDown += _changeColor_MouseDown; _applyButton = new ValidateButton("Apply Changes", Dimensions.GetWidth() * 0.3, Dimensions.GetHeight() * 0.07, new System.Windows.Thickness(0, 30, 0, 30), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center); _applyButton.MouseDown += _applyButton_MouseDown; _cancelButton = new CancelButton("Cancel", Dimensions.GetWidth() * 0.3, Dimensions.GetHeight() * 0.07, new System.Windows.Thickness(0, 0, 0, 0), new System.Windows.Thickness(5, 5, 5, 5), System.Windows.HorizontalAlignment.Center); _cancelButton.MouseDown += _cancelButton_MouseDown; }