Here are the steps:
Step 1: Firstly, we will create a simple Universal Windows Blank Project in Visual Studio 2015.
Step 2: In the Xaml editor define your rows by using the following lines of code.
- <Grid.RowDefinitions>
- <RowDefinition Height="0.15*"></RowDefinition>
- <RowDefinition Height="0.85*"></RowDefinition>
- </Grid.RowDefinitions>
After this add border and StackPanel in your application.
Step 3: Add border by using the following lines of code.
- <Border Background="Plum" Grid.Row="0">
- <TextBlock Text="Suggestions Form" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30" Foreground="Salmon" FontWeight="ExtraBlack" />
- </Border>
Step 4: Similarly, add stack panel in your application which includes all the textboxes and submit button by using the following lines of code.
- <StackPanel Grid.Row="1">
- <TextBox PlaceholderText="First Name" Margin="10"></TextBox>
- <TextBox PlaceholderText="Last Name" Margin="10"></TextBox>
- <TextBox PlaceholderText="Enter Email" Margin="10"></TextBox>
- <TextBox PlaceholderText="Suggestions and Feedback" Height="250" Margin="10"></TextBox>
- <Button Width="100" Height="60" HorizontalAlignment="Center" Name="submitbtn1" Click="submitbtn1_Click">
- <Button.Background>
- <ImageBrush Stretch="Fill" ImageSource="Assets/images.jpg" />
- </Button.Background>
- </Button>
- </StackPanel>
Step 5: You can add image on a button by going into the Assets folder, right click on it and click "
Existing Item" and browse some image from your system and click OK.
Now go to the property window of your button and click Tile brush, then select Image source.