/// <summary> /// Init the Arcbutton with every parameters. /// </summary> /// <param name="size">The total size of the button height/width.</param> /// <param name="textValues">The values for the different buttons.</param> public ArcButton(double size, Dictionary <Position, string> textValues, string background = null, string borderBrush = null, string foreground = null, string fontFamily = null, double fontSize = default(double), double strokeThickness = default(double), string borderBrushPressed = null, string backgroundPressed = null, double proportion = default(double)) { InitializeComponent(); Grid.Height = size; Grid.Width = size; var arcButtons = new List <BaseArcButton> { DrawUtil.CreateBaseArcButton(size, Position.Left, textValues[Position.Left], proportion, strokeThickness), DrawUtil.CreateBaseArcButton(size, Position.Right, textValues[Position.Right], proportion, strokeThickness), DrawUtil.CreateBaseArcButton(size, Position.Top, textValues[Position.Top], proportion, strokeThickness), DrawUtil.CreateBaseArcButton(size, Position.Bottom, textValues[Position.Bottom], proportion, strokeThickness), DrawUtil.CreateBaseArcButton(size, Position.Center, textValues[Position.Center], proportion, strokeThickness) }; foreach (var button in arcButtons) { if (!string.IsNullOrWhiteSpace(background)) { button.Background = background; } if (!string.IsNullOrWhiteSpace(borderBrush)) { button.BorderBrush = borderBrush; } if (!string.IsNullOrWhiteSpace(foreground)) { button.Foreground = foreground; } if (!string.IsNullOrWhiteSpace(fontFamily)) { button.FontFamily = fontFamily; } if (!string.IsNullOrWhiteSpace(borderBrushPressed)) { button.BorderBrushPressed = borderBrushPressed; } if (!string.IsNullOrWhiteSpace(backgroundPressed)) { button.BackgroundPressed = backgroundPressed; } if (fontSize != default(double)) { button.FontSize = fontSize; } Grid.Children.Add(button); } }