This section of the task
Write a Hello world! with WPF Program
XAML Code
<Windowx:class= "Demo1." MainWindow "xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d= "http://schemas.microsoft.com/expression/blend/2008"XMLNS:MC= "http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:local= "Clr-namespace:demo1"mc:ignorable= "D"Title= "MainWindow"Height= "The "Width= "$"> <GridMargin= "0,0,3.6,0"> <grid.rowdefinitions> <RowDefinitionHeight= "+"></RowDefinition> <RowDefinitionHeight= "+"></RowDefinition> <RowDefinitionHeight= "+"></RowDefinition> <RowDefinitionHeight= "+"></RowDefinition> </grid.rowdefinitions> <TextBoxGrid.Row= "0"Grid.column= "0"Name= "Pass"/> <ButtonGrid.Row= "2"Grid.column= "0"Click= "Button_Click" >Click Me</Button> </Grid></Window>
C # code
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Windows;usingSystem.Windows.Controls;usingSystem.Windows.Data;usingSystem.Windows.Documents;usingSystem.Windows.Input;usingSystem.Windows.Media;usingSystem.Windows.Media.Imaging;usingSystem.Windows.Navigation;usingSystem.Windows.Shapes;namespacedemo1{/// <summary> ///the interactive logic of MainWindow.xaml/// </summary> Public Partial classMainwindow:window { PublicMainWindow () {InitializeComponent (); } Private voidButton_Click (Objectsender, RoutedEventArgs e) { This. Pass. Text ="Hello world!"; } }}
P2 first knowledge of various applications