public void SetButtonVisibility(HeaderButtonType type, Visibility value) { switch (type) { case HeaderButtonType.Delete: if (DeleteImage.Visibility == value) { return; } DeleteImage.Visibility = value; break; case HeaderButtonType.Hide: if (HideImage.Visibility == value) { return; } HideImage.Visibility = value; break; } if (HideImage.Visibility == Visibility.Visible && DeleteImage.Visibility == Visibility.Visible) { Canvas.SetLeft(this, InitialLeft); } else if (HideImage.Visibility == Visibility.Visible) { Canvas.SetLeft(this, InitialLeft + HideImage.ActualWidth); } else if (DeleteImage.Visibility == Visibility.Visible) { Canvas.SetLeft(this, InitialLeft + DeleteImage.ActualWidth); } }
public void SetButtonTooltip(HeaderButtonType type, string toolTip) { switch (type) { case HeaderButtonType.Delete: DeleteImage.ToolTip = toolTip; break; case HeaderButtonType.Hide: HideImage.ToolTip = toolTip; break; } }
public void SetButtonVisibility(HeaderButtonType type, Visibility value) { switch (type) { case HeaderButtonType.Delete: DeleteButton.Visibility = value; break; case HeaderButtonType.Hide: HideButton.Visibility = value; break; case HeaderButtonType.Panel: PanelButton.Visibility = value; break; } }
public void SetButtonVisibility(HeaderButtonType type, Visibility value) { switch (type) { case HeaderButtonType.Delete: if (DeleteImage.Visibility == value) return; DeleteImage.Visibility = value; break; case HeaderButtonType.Hide: if (HideImage.Visibility == value) return; HideImage.Visibility = value; break; } if (HideImage.Visibility == Visibility.Visible && DeleteImage.Visibility == Visibility.Visible) Canvas.SetLeft(this, InitialLeft); else if (HideImage.Visibility == Visibility.Visible) Canvas.SetLeft(this, InitialLeft + HideImage.ActualWidth); else if (DeleteImage.Visibility == Visibility.Visible) Canvas.SetLeft(this, InitialLeft + DeleteImage.ActualWidth); }
internal HeaderButtonClickedEventArgs(HeaderButtonType type) { ButtonType = type; }