using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Interop; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shell; namespace _29WxOrderWpf.BaseWindows { public class BaseWindow : Window { public BaseWindow() { //this.Icon = new BitmapImage(new Uri("pack://application:,,,/Resources/29wx.ico")); this.Icon = Application.Current.Resources["main29WeixinIcon"] as ImageSource; this.WindowStartupLocation = WindowStartupLocation.CenterScreen; WindowChrome.SetWindowChrome(this, new WindowChrome() { CaptionHeight = 8, ResizeBorderThickness = new Thickness(4), }); this.DataContext = this; } } }