HomeSearch

WPF Pages

Dot Net Perls has example pages for many languages, with explanations and code side by side (for easy understanding).
C#F#GoJavaJavaScriptPythonRubyScalaSwiftVB.NETWPF

CheckBox.

Use the WPF CheckBox control with the Checked and Unchecked events.WPF CheckBox Example: Checked, Unchecked

DataGrid.

Use the WPF DataGrid to display an editable table. Access the ItemsSource property.WPF DataGrid Examples: ItemsSource

Border.

Use the WPF Border control with BorderBrush. Apply the Stretch property to fill a Window.WPF Border Example

Button.

Use the WPF Button control, adding C# code to handle Button events.WPF Button Control Example

Canvas.

Use the WPF Canvas control to draw colored rectangles. Position with SetLeft and SetTop.WPF Canvas Example: SetLeft, SetTop

ComboBox.

Use the WPF ComboBox control with the ItemsSource property in C# code.WPF ComboBox Example (ItemsSource)

DatePicker.

Add the WPF DatePicker control. Access SelectedDateChanged and SelectedDate.WPF DatePicker Example: SelectedDate

Expander.

Use the WPF Expander control to show or hide controls. See the effect of ExpandDirection.WPF Expander Control: Expanded, Collapsed

GridSplitter.

Use the resizable WPF GridSplitter control to split a Grid with rows.WPF GridSplitter Example

Image.

Use the WPF Image control to display JPG, PNG files. Understand the BitmapImage type.WPF Image Example: PNG, JPG Files

KeyDown.

Understand the WPF KeyDown and KeyUp event handlers. Test keys with the Key property.WPF KeyDown Event Handler

Label.

Add the WPF Label control and handle Label_Loaded. Access Label attributes.WPF Label Example

ListView.

Use the WPF ListView control. The inner GridView is used to display data.WPF ListView Control: Add Items to GridView

Menu.

Add the WPF Menu, MenuItem and Separator for a menu bar. Review the Click event handler.WPF Menu, MenuItem and Separator

ProgressBar.

Use the WPF ProgressBar control. Set the Value and access the Maximum.WPF ProgressBar: Value and Maximum

RadioButton.

Use the WPF RadioButton control. Handle the RadioButton_Checked event.WPF RadioButton Example (Checked)

ScrollViewer.

Use the WPF ScrollViewer control to provide a scrollable area for sub-controls.WPF ScrollViewer Control

Slider.

Use the WPF Slider control with ValueChanged, Value and Maximum.WPF Slider Example (ValueChanged)

TabControl.

Use the WPF TabControl with TabItems and Grid controls. Access SelectedItem in C# code.WPF TabControl Example: TabItem

TextBlock.

Use the WPF TextBlock control to display a styled rectangle with string data.WPF TextBlock Example

TextBox.

Use the WPF TextBox control with the TextChanged event handler and the Text property.WPF TextBox Example: Text Property, TextChanged

TreeView.

Use the WPF TreeView control by adding TreeViewItem instances to the Items collection.WPF TreeView Example: TreeViewItem

Viewbox.

Use the WPF Viewbox control to stretch an internal control. Set the Stretch XAML attribute.WPF Viewbox Example
Home
Dot Net Perls
© 2007-2019 Sam Allen. All rights reserved. Written by Sam Allen, info@dotnetperls.com.