Main Page xaml Page Grid Page x ClassFirst

  • Slides: 24
Download presentation

Main. Page. xaml מספר , Page • קוד ברירת המחדל של הדף נכיל את

Main. Page. xaml מספר , Page • קוד ברירת המחדל של הדף נכיל את התגית . Grid הגדרות של הדף ואת התגית <Page x: Class="First. App. Main. Page" xmlns="http: //schemas. microsoft. com/winfx/2006/xaml/presentation" xmlns: x="http: //schemas. microsoft. com/winfx/2006/xaml" xmlns: local="using: First. App" xmlns: d="http: //schemas. microsoft. com/expression/blend/2008" xmlns: mc="http: //schemas. openxmlformats. org/markup-compatibility/2006" mc: Ignorable="d"> <Grid Background="{Theme. Resource Application. Page. Background. Theme. Brush}"> </Grid> </Page>

Main. Page. xaml : Grid בתוך התגית XAML- • נוסיף את הקוד הבא לחלונית

Main. Page. xaml : Grid בתוך התגית XAML- • נוסיף את הקוד הבא לחלונית ה <Page x: Class="First. App. Main. Page" xmlns="http: //schemas. microsoft. com/winfx/2006/xaml/presentation" xmlns: x="http: //schemas. microsoft. com/winfx/2006/xaml" xmlns: local="using: First. App" xmlns: d="http: //schemas. microsoft. com/expression/blend/2008" xmlns: mc="http: //schemas. openxmlformats. org/markup-compatibility/2006" mc: Ignorable="d"> <Grid Background="{Theme. Resource Application. Page. Background. Theme. Brush}"> <Stack. Panel Horizontal. Alignment="Center" Vertical. Alignment="Center" Width="400" > <Text. Block Name="txt. Display. Data" Font. Size="30"></Text. Block> <Text. Box Name="txt. Data" Font. Size="30"></Text. Box> <Button Name="btn. Click" Content="Click Me" Click="btn. Click_Click" Font. Size="30" Horizontal. Alignment="Center"></Button> </Stack. Panel> </Grid> </Page>

Main. Page. xaml. cs : • נוסיף את הקוד הבא מתחת לבנאי public sealed

Main. Page. xaml. cs : • נוסיף את הקוד הבא מתחת לבנאי public sealed partial class Main. Page : Page { public Main. Page() { this. Initialize. Component(); } private void btn. Click_Click(object sender, Routed. Event. Args e) { txt. Display. Data. Text = txt. Data. Text; } }