Skip to main content

Posts

UWP - How to use CalendarDatePicker

UWP CalendarDatePicker The CalendarDatePicker class represents a control that allows a UWP app user to pick a date from a calendar display. The UWP app developers can use a CalendarDatePicker to show a drop-down control that is optimized for picking a single date from a calendar view where the fullness of the calendar is important. The CalendarDatePicker control is similar to the DatePicker control, but the DatePicker has no calendar view. The windows app developers can customize the CalendarDatePicker widget with a minimal amount of XAML or other code. The CalendarDatePicker control has an internal calendar view for picking a date. It also has a subset of CalendarView properties to let the windows developers customize it. The CalendarDatePicker DateChanged event occurs when the date value is changed in a CalendarDatePicker widget. So, using this event, the Windows UWP developers can instantly get the CalendarDatePicker control’s selected date.

UWP - How to use TimePicker

UWP TimePicker The TimePicker class represents a control that allows a UWP app user to pick a time value. The TimePicker widget gives the app developers a standardized way to let UWP app users pick a time value using touch, mouse, or keyboard input. The Windows UWP app developers can use a TimePicker to let a user enter a single time value. The developers can customize the TimePicker to use a 12-hour or 24-hour clock. The UWP TimePicker control shows a 12-hour clock with an AM PM selector by default. The Windows app developers can set the TimePicker class’s ClockIdentifier property to 24HourClock to show a 24-hour clock instead. The TimePicker class’s TimeChanged event occurs when the value of the Time property is changed. So using this event, the Windows UWP developers can instantly get the TimePicker control’s selected time. The TimePicker class’s Time property allows us to get or set the time currently set in the TimePic

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 - How to use DatePicker

UWP DatePicker The DatePicker class represents a control that allows a UWP app user to pick a date value. The UWP app developers can use a DatePicker control to let UWP app users enter a date value. The user picks the date using ComboBox selection for month, day, and year values. The UWP app developers can customize the DatePicker widget’s default look. The DatePicker widget shows the day, month, and year by default. The UWP app developers can hide any field that they don't need. To hide a field from the DatePicker widget, set its corresponding fieldVisible property to false. A DateTimeFormatter creates the string content of each ComboBox in the DatePicker. The .net developers can use a string that is either a format template or a format pattern to specify the format. The DatePicker DateChanged event occurs when the date value is changed in a DatePicker widget. So, using this event, the UWP developers can instantly get the Date

UWP - How to use PasswordBox

UWP PasswordBox The PasswordBox class represents a control for entering passwords. PasswordBox lets a user enter a masked password. The Windows UWP app users can enter a single line of non-wrapping text in a PasswordBox control. The PasswordBox text is not displayed while it is entered, only masked characters are displayed. The .net developers can specify this password character by setting the PasswordChar property. The PasswordBox class PasswordRevealMode property gets or sets a value that specifies whether the password is always, never, or optionally obscured. This property value is a value of the enumeration that specifies whether the password is always, never, or optionally obscured. The default value of this property is Peek which ensures the password reveal button is visible and the password is not obscured while the button is pressed. The PasswordBox class PasswordChar property gets or sets the masking character for the PasswordBox.

UWP - How to set ComboBox default selected item

UWP - Set ComboBox Default Selected Item The ComboBox class represents a selection control that combines a non-editable text box and a drop-down list box that allows UWP app users to select an item from a list. The ComboBox starts in a compact state and it expands to display a list of selectable items. The ComoboBox control is also known as a drop-down list. The following UWP app development tutorial code demonstrates how we can set the ComboBox default selected item. That means we will set an item of ComboBox as its pre-selected item. In this UWP example code, we populate the ComboBox with items from a String data type list. The ItemsControl class’s ItemsSource property gets or sets an object source used to generate the content of the ItemsControl such as a ComboBox control. So we data bind the ComboBox control with a list of String values using this ItemsSource property. Now the part is how we can make an item the default sele

UWP - ComboBox DisplayMemberPath and SelectedValuePath

UWP - ComboBox DisplayMemberPath and SelectedValuePath The ComboBox class represents a selection control that combines a non-editable text box and a drop-down list box that allows UWP app users to select an item from a list. The ComboBox starts in a compact state and it expands to display a list of selectable items. The ComoboBox control is also known as a drop-down list. The ItemsControl class’s DisplayMemberPath property gets or sets the name or path of the property that is displayed for each data item. This property value is a String instance that is the name or path of the property that is displayed for each data item in the control. The default value of this property is an empty string. The Selector class’s SelectedValuePath property gets or sets the property path that is used to get the SelectedValue property of the SelectedItem property. This property value is also a String object that is the property path that is used to get the Selecte