using System.Windows; using System.Windows.Media; namespace XHWK.WKTool { /// /// PromptWindow.xaml 的交互逻辑 /// public partial class PromptWindow { public PromptWindow() { InitializeComponent(); } public void Initialize(string name) { TxbName.Text = name; } private void Window_SizeChanged(object sender, SizeChangedEventArgs e) { System.Windows.Rect r = new System.Windows.Rect(e.NewSize); RectangleGeometry gm = new RectangleGeometry( r, 1, 1 ); ((UIElement)sender).Clip = gm; } } }