学海无涯

导航

上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 45 下一页

2023年1月20日 #

Windows and Dialogs 窗体 对话框

摘要: <Window x:Class="WpfTestBlankApp.Views.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft 阅读全文

posted @ 2023-01-20 11:50 宁静致远. 阅读(50) 评论(0) 推荐(0)

2023年1月15日 #

Windows and Dialogs 窗口和对话框

摘要: 无边框,无外壳,且不能改变大小的窗口: WindowStyle="None" ResizeMode="NoResize" 窗口生命周期: Activated 当窗口被激活(例如,单击)时引发。如果窗口从未被激活,您将不会获得此事件(或相应的 Deactivated事件)。 Closing 当窗口试图 阅读全文

posted @ 2023-01-15 11:05 宁静致远. 阅读(197) 评论(0) 推荐(0)

2023年1月13日 #

Control Templates 控制模板

摘要: 简单控制模板 <Button Margin="0,0,2,2" Grid.Row="0" Grid.Column="0" Name="cell00" > <Button.Template> <ControlTemplate> <Grid> <Rectangle Fill="Orange"/> </G 阅读全文

posted @ 2023-01-13 18:21 宁静致远. 阅读(63) 评论(0) 推荐(0)

2023年1月12日 #

Styles 样式

摘要: Inline Styles 内联样式 <Button Margin="0,0,2,2" Grid.Row="0" Grid.Column="0" Name="cell00" > <Button.Style> <Style> <Setter Property="Button.FontSize" Val 阅读全文

posted @ 2023-01-12 16:25 宁静致远. 阅读(78) 评论(0) 推荐(0)

2023年1月11日 #

Binding to List Data 绑定到列表数据

摘要: 得到当前项 1 void birthdayButton_Click(object sender, RoutedEventArgs e) { 2 // Get the current person out of the collection view 3 People people = (People 阅读全文

posted @ 2023-01-11 10:57 宁静致远. 阅读(142) 评论(0) 推荐(0)

2023年1月10日 #

Data Binding 数据绑定

摘要: Person person = new Person("Tom", 11); public MainWindow(IRegionManager regionManager) { InitializeComponent(); birthdayButton.Click += BirthdayButton 阅读全文

posted @ 2023-01-10 09:48 宁静致远. 阅读(65) 评论(0) 推荐(0)

2023年1月9日 #

控件

摘要: 什么是控件? 大多数流行的 UI 框架都提供类似于控件的抽象,而 WPF 采用了一种稍微不寻常的方 法,因为控件通常不直接负责它们自己的外观。 WPF 中的控件都是关于行为的,它们 遵从模板来提供视觉效果。许多 GUI 框架要求您在自定义控件外观时编写自定义控 许多 WPF 用户界面元素不是控件。例 阅读全文

posted @ 2023-01-09 09:06 宁静致远. 阅读(179) 评论(0) 推荐(0)

2023年1月8日 #

事件

摘要: 事件分为:冒泡事件、隧道事件、和直接事件 隧道事件名称始终以Preview开头并首先引发。这使目标元素的父元素有机会在事件到达子元 素之前看到它(因此有Preview前缀)。隧道预览事件紧随冒泡事件之后。 在大多数情况下,只处理冒泡事件,隧道事件通常仅在你希望能够阻止该事件时,或者如果你需要父级在正 阅读全文

posted @ 2023-01-08 11:57 宁静致远. 阅读(114) 评论(0) 推荐(0)

2023年1月7日 #

共享尺寸组 SharedSizeGroup

摘要: 整体布局由DockPanel 定义,使用附加的Dock.Top属性将标头Grid定位在顶部,并 允许ScrollViewer填充剩余空间。 1 <DockPanel Grid.IsSharedSizeScope="True"> 2 <DockPanel.Resources> 3 <Style Tar 阅读全文

posted @ 2023-01-07 13:20 宁静致远. 阅读(177) 评论(0) 推荐(0)

绘图

摘要: 画线 <Rectangle Grid.Row="5" Grid.ColumnSpan="2" Height="1" Fill="Blue" /> <Border Grid.ColumnSpan="2" Grid.Row="4" VerticalAlignment="Top" BorderBrush= 阅读全文

posted @ 2023-01-07 12:30 宁静致远. 阅读(55) 评论(0) 推荐(0)

上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 45 下一页