WPF-Base/WPF基础/MainWindow.xaml.cs

16 lines
345 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Windows;
namespace WPF基础;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
MessageBox.Show(string.Format($"这个Grid的宽高是{Grid.ActualWidth}和{Grid.ActualHeight}"));
}
}