using System; using System.Collections.Generic; using System.Linq; using System.Text; 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 WpfAppType3 { /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : Window { Label label1 = new Label(); public MainWindow() { InitializeComponent(); label1.Content = "MainWindow Iniitialzed"; grid1.Children.Add(label1); MessageBox.Show(label1.Content.ToString()); method1(); } private void InitializedComponent() { } private void method1() { label1.Content += "\n Reading from memory \n Windows method"; MessageBox.Show(label1.Content.ToString()); } } }