Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- System.Windows.Controls.Button b = new System.Windows.Controls.Button();
- System.Windows.Shapes.Rectangle r = new System.Windows.Shapes.Rectangle();
- r.Width = 40;
- r.Height = 40;
- r.Fill = System.Windows.Media.Brushes.Black;
- b.Content = r; // Make the square the content of the Button
- this.AddChild(b);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement