using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace BPASmartClient.CustomResource.UserControls { /// /// TitleTextBlock.xaml 的交互逻辑 /// public partial class TitleTextBlock : UserControl { public TitleTextBlock() { InitializeComponent(); } private void Canvas_SizeChanged(object sender, SizeChangedEventArgs e) { PointCollection points = new PointCollection(); points.Add(new Point(0, 0)); points.Add(new Point(e.NewSize.Width - (e.NewSize.Height / 2), 0)); points.Add(new Point(e.NewSize.Width, e.NewSize.Height)); points.Add(new Point(0, e.NewSize.Height)); this.poly.Points = points; } } }