Skip to main content

Posts

UWP - CalendarDatePicker example

MainPage.xaml <Page x:Class="UniversalAppTutorials.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UniversalAppTutorials" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <StackPanel x:Name="stack_panel1" Orientation="Vertical" Background="AntiqueWhite" Padding="50,175,50,25" > <CalendarDatePicker x:Name="CalendarDatePicker1" Header="Select A Date" DateChanged="CalendarDatePicker1_DateChanged" /> <TextBlock x:Name="TextBlock1" Foreground="DarkBlue"…

UWP - TimePicker example

MainPage.xaml <Page x:Class="UniversalAppTutorials.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UniversalAppTutorials" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <StackPanel x:Name="stack_panel1" Orientation="Vertical" Background="AliceBlue" Padding="50,150,50,25" > <TimePicker x:Name="TimePicker1" TimeChanged="TimePicker1_TimeChanged" Header="Select A Time" /> <TextBlock x:Name="TextBlock1" Foreground="Navy" FontSize="21…

UWP - Format DatePicker selected date

MainPage.xaml <Page x:Class="UniversalAppTutorials.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UniversalAppTutorials" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <StackPanel x:Name="stack_panel1" Orientation="Vertical" Background="Snow" Padding="50" > <DatePicker x:Name="DatePicker1" DateChanged="DatePicker1_DateChanged" Header="Select A Date" /> <TextBlock x:Name="TextBlock1" Foreground="Navy" FontSize="21" …

UWP - DatePicker example

MainPage.xaml <Page x:Class="UniversalAppTutorials.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UniversalAppTutorials" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <StackPanel x:Name="stack_panel1" Orientation="Horizontal" Background="GhostWhite" Padding="50" > <DatePicker x:Name="DatePicker1" DateChanged="DatePicker1_DateChanged" /> <TextBlock x:Name="TextBlock1" Foreground="Navy" FontSize="22" TextWrapping="Wrap" …

UWP - PasswordBox example

MainPage.xaml <Page x:Class="UniversalAppTutorials.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UniversalAppTutorials" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <StackPanel x:Name="stack_panel1" Orientation="Vertical" Background="GhostWhite" Padding="100" > <TextBlock x:Name="TextBlock1" Foreground="Crimson" Margin="15" FontSize="20" /> <PasswordBox x:Name="PasswordBox1" Header="Password" PlaceholderText…

UWP - ComboBox default selected item

MainPage.xaml <Page x:Class="UniversalAppTutorials.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UniversalAppTutorials" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <StackPanel x:Name="stack_panel1" Orientation="Horizontal" Background="GhostWhite" Padding="100" > <ComboBox x:Name="ComboBox1" Header="Select A Color" > </ComboBox> </StackPanel> </Page> MainPage.xaml.cs using Windows.UI.Xaml.Controls; using System.Collections.Generic; namespace UniversalAppTutorials { public seale…

UWP - ComboBox DisplayMemberPath and SelectedValuePath

MainPage.xaml <Page x:Class="UniversalAppTutorials.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UniversalAppTutorials" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <StackPanel x:Name="stack_panel1" Orientation="Horizontal" Background="LightYellow" Padding="100" > <ComboBox x:Name="ComboBox1" Header="Select A Color" DisplayMemberPath="ColorName" SelectedValuePath="ColorValue" SelectionChanged="ComboBox1_SelectionChanged" > </ComboBox> …