<Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">

            <Button.Content>

                <Rectangle Height="40" Width="40" Fill="Black" />

            </Button.Content>

        </Button>

 

 

 

           System.Windows.Controls.Button button = new System.Windows.Controls.Button();

            System.Windows.Shapes.Rectangle r = new Rectangle();

            r.Width = 40;

            r.Height = 40;

            r.Fill = System.Windows.Media.Brushes.Black;

            button.Content = r;

           this.Content = button;
 

 

 

相关文章:

  • 2021-08-20
  • 2022-02-18
  • 2021-07-11
  • 2021-06-23
猜你喜欢
  • 2022-12-23
  • 2021-12-29
  • 2021-05-16
  • 2021-11-28
  • 2022-02-22
  • 2022-02-03
相关资源
相似解决方案