Intersoft ClientUI 8 > Getting Started > Getting Started Walkthroughs > Walkthrough: Create Your First ClientUI Application |
This walkthrough provide a step-by-step guidance to create a simple login form using various ClientUI controls.
In this walkthrough, you will learn the following concept:
You need the following components to complete this walkthrough:
The first step is to create a new ClientUI Application project using Intersoft ClientUI Application project template.
This section steps you through the process of creating the user interface for your simple login form using ClientUI controls such as GlassLabel, UXTextBox and UXPasswordBox.
Properties | Value |
---|---|
HorizontalAlignment | Center |
VerticalAlignment | Center |
Width | Auto |
Height | Auto |
XAML |
Copy Code
|
---|---|
<Grid x:Name="LayoutRoot"> <StackPanel HorizontalAlignment="Center" Name="stackPanel1" VerticalAlignment="Center"/> </Grid> |
XAML |
Copy Code
|
---|---|
<StackPanel HorizontalAlignment="Center" Name="stackPanel1" VerticalAlignment="Center"> <Intersoft:GlassLabel Content="My First ClientUI Application" Name="glassLabel1" /> </StackPanel> |
XAML |
Copy Code
|
---|---|
<StackPanel HorizontalAlignment="Center" Name="stackPanel1" VerticalAlignment="Center"> ... <Intersoft:FieldLabel Header="Username: " Name="fieldLabel1" HorizontalAlignment="Center"> <Intersoft:UXTextBox Name="uXTextBox1" Width="80" /> </Intersoft:FieldLabel> </StackPanel> |
XAML |
Copy Code
|
---|---|
<StackPanel HorizontalAlignment="Center" Name="stackPanel1" VerticalAlignment="Center"> ... <Intersoft:FieldLabel Header="Password: " Name="fieldLabel2" HorizontalAlignment="Center"> <Intersoft:UXPasswordBox Name="uXPasswordBox1" Width="80" /> </Intersoft:FieldLabel> </StackPanel> |
XAML |
Copy Code
|
---|---|
<StackPanel HorizontalAlignment="Center" Name="stackPanel1" VerticalAlignment="Center"> ... <Intersoft:GlassButton Content="OK" Name="glassButton1" HorizontalAlignment="Right" Width="50" /> </StackPanel> |
C# |
Copy Code
|
---|---|
private void glassButton1_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Your Username: "+uXTextBox1.Text+"\nYour Password: "+uXPasswordBox1.Password); } |
In this walkthrough, you have learned how to create a new ClientUI Application project using Intersoft ClientUI Application project template, and create simple login form using ClientUI Controls.
This section lists the complete code used in this walkthrough.
XAML |
Copy Code
|
---|---|
<Intersoft:UXPage 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" xmlns:Intersoft="http://intersoft.clientui.com/schemas" x:Class="CreatingFirstClientUIApp.MainPage" Title="MainPage Page" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <StackPanel HorizontalAlignment="Center" Name="stackPanel1" VerticalAlignment="Center"> <Intersoft:GlassLabel Content="My First ClientUI Application" Name="glassLabel1" /> <Intersoft:FieldLabel Header="Username: " Name="fieldLabel1" HorizontalAlignment="Center"> <Intersoft:UXTextBox Name="uXTextBox1" Width="80" /> </Intersoft:FieldLabel> <Intersoft:FieldLabel Header="Password: " Name="fieldLabel2" HorizontalAlignment="Center"> <Intersoft:UXPasswordBox Name="uXPasswordBox1" Width="80" /> </Intersoft:FieldLabel> <Intersoft:GlassButton Content="OK" Name="glassButton1" HorizontalAlignment="Right" Width="50" Click="glassButton1_Click" /> </StackPanel> </Grid> </Intersoft:UXPage> |
C# |
Copy Code
|
---|---|
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using Intersoft.Client.UI.Navigation; namespace CreatingFirstClientUIApp { public partial class MainPage : UXPage { public MainPage() { InitializeComponent(); } // Executes when the user navigates to this page. protected override void OnNavigatedTo(NavigationEventArgs e) { } private void glassButton1_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Your Username: "+uXTextBox1.Text+"\nYour Password: "+uXPasswordBox1.Password); } } } |