tried to do this that didnt work. I get a blank window
please advise.
(not an expert developer... )
class CustomTriangleButton : Button { public CustomTriangleButton() { System.Windows.Shapes.Path trianglePath = new System.Windows.Shapes.Path(); trianglePath.Fill = Brushes.Black; trianglePath.Data = Geometry.Parse("M0,0 L0,20 L20,10 Z"); Content = new Grid { Children = { trianglePath, new TextBlock { Text = "Click Me", HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center } } }; } }
CustomTriangleButton customButton = new CustomTriangleButton() customButton.Content = customButton; customButton.Click += CancelStopOrdersButton_Click; Grid.SetRow(customButton, TotalNumberofCellsInGrid); Grid.SetColumn(customButton, 1); grid.Children.Add(customButton);
Comment