Wpf 02 basic controls

30 0 0
Wpf 02 basic controls

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

PowerPoint Presentation Basic controls Windows Presentation Foundation Label Provide feedforward information Target intended control that get focus 2 TextBox AcceptsReturn = True edit multiple lines 3[.]

Basic controls Windows Presentation Foundation Label  Provide feedforward information  Target: intended control that get focus TextBox  AcceptsReturn = True: edit multiple lines Button  Derive from ButtonBase  Basic control, user can click Activity  Write XAML code for login screen with Username and Password ToggleButton  events  Checked when IsChecked is True  Unchecked when IsChecked is False  Indeterminate when IsChecked is null CheckBox & RadioButton  Derives from: ToggleButton -> ButtonBase  Main property: IsChecked  Normally Checkbox is just ToggleButton with different appearance RadioButton – Grouping by name Activity – Problems? Activity - Improvement Text properties Family Courier Helvetica 12 CPI Sans serif 15 CPI Times Proportional Size Border Pitch 10 CPI Style Color Small Bold Medium Italic Large Underline OK Black Blue Green Red Apply Cancel Help 10 ListView ItemTemplate 16 TreeView  Presents a hierarchical view  Data with nodes that can be expanded and collapsed  Important events:     Expanded Collapsed Selected Unselected 17 GroupBox & Expander  Both provide a container for arbitrary content and a place for a header on top  Expander can be expanded and collapsed  GroupBox always shows its content  Both controls derive from HeaderedContentControl 18 Menu 19  MenuItem is a headered items control  The Header is actually the main object  MenuItem contains properties for customizing  Icon  IsCheckable  InputGestureText  Can handle events or assign a command to MenuItem’s Command property 20

Ngày đăng: 09/04/2023, 06:31

Tài liệu cùng người dùng

Tài liệu liên quan