using System; using System.Collections.Generic; using System.Linq; using System.Text; //add Windows using System.Windows; using System.Windows.Controls; //for Bitmap using System.Windows.Media; using System.Windows.Media.Imaging; namespace WpfBaseApp5 { public class ProxyApp : Application { //ProxyApp() { } private StackPanel panel1; private Label label1; protected override void OnStartup(StartupEventArgs args) { base.OnStartup(args); ProxyMain win = new ProxyMain(); win.Width = 300; win.Height = 300; Point first = new Point(0, 0); Point second = new Point(1, 1); LinearGradientBrush lgb = new LinearGradientBrush(Colors.BlanchedAlmond, Colors.Red, first, second); win.Background = lgb; // creating windows controls TextBox testBox1 = new TextBox(); Menu stackPanelMenu = new Menu(); MenuItem pasteMenuItem = new MenuItem(); panel1 = new StackPanel(); label1 = new Label(); label1.Content = " New Label \n Also Click on the Body" + win.str1; // Button b1 = new Button(); b1.Content = "ClickMe"; b1.Click += new RoutedEventHandler(Click_Me); panel1.Children.Add(label1); panel1.Children.Add(testBox1); panel1.Children.Add(b1); win.Content = panel1; win.Show(); } private void Click_Me(Object sender, RoutedEventArgs e) { label1.Content += "\n You clicked a Button"; } } }