<UserControl x:Class="First_App.MainPage" 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" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True"> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <TextBlock Name="txtname" Height="25" Width="75" HorizontalAlignment="Center"></TextBlock> <TextBox Name="txtbxname" Height="35" Width="90" HorizontalAlignment="Center" Margin="15" Grid.Row="2"></TextBox> <Button Name="mybtn" Content="ClickMe" Grid.Row="3" Width="55" Height="35" Click="mybtn_Click"></Button> </Grid> </UserControl>
public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); } private void mybtn_Click(object sender, RoutedEventArgs e) { txtname.Text = txtbxname.Text; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)