上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 56 下一页
摘要: 就近原则 1、“行内”覆盖“嵌入”,“嵌入”覆盖“外部”Style.xml <Window.Resources> <Grid.Resources> ….中间层 <Button.Resources> </Button.Resources> </Grid.Resources> </Window.Reso 阅读全文
posted @ 2017-12-31 11:48 Lulus 阅读(499) 评论(0) 推荐(0)
摘要: margin是自己与父容器的间距padding是自己与子控件的间距 <Grid Background="AntiqueWhite"> <Border Margin="10" Padding="20" Background="CadetBlue"> <Button Background="BurlyW 阅读全文
posted @ 2017-12-30 22:35 Lulus 阅读(1107) 评论(0) 推荐(0)
摘要: 使用TabIndex设置顺序 <StackPanel Orientation="Vertical"> <Button Content="Button1" TabIndex="0"></Button> <Button Content="Button2" TabIndex="1"></Button> < 阅读全文
posted @ 2017-12-30 22:34 Lulus 阅读(1461) 评论(0) 推荐(1)
摘要: 设置单元格的样式 <DataGrid.Columns> <DataGridTextColumn Header="检测项目" Binding="{Binding ItemName}" Width="*" /> <DataGridTemplateColumn Header="详细" Width="80" 阅读全文
posted @ 2017-12-30 22:34 Lulus 阅读(5492) 评论(0) 推荐(2)
摘要: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition> </Grid.ColumnDefini 阅读全文
posted @ 2017-12-30 22:33 Lulus 阅读(646) 评论(0) 推荐(0)
摘要: 同属一个GroupName则互斥,只能选择一个 <StackPanel Orientation="Vertical"> <Label Content="Group1:水果"></Label> <RadioButton GroupName="Group1" Content="苹果"></RadioBu 阅读全文
posted @ 2017-12-30 22:32 Lulus 阅读(724) 评论(0) 推荐(0)
摘要: 标签属性,用于存放任何东西,所有控件都有Tag属性Tag可以用来存放存放图层uri访问地址等等 控件模板的数据获取XXX.Tag as YYY 举例: <Button Content="点击我获得Tag属性的内容" Height="100" Width="150" Tag="这是Tag的内容" Cl 阅读全文
posted @ 2017-12-30 22:32 Lulus 阅读(2359) 评论(1) 推荐(0)
摘要: 简介 "用户控件"继承自UserControl,而UserControl继承自ContentControl,也就是内容控件UserControl和Window是一个层次上的,都有xaml和cs文件 流程 创建用户控件 写好用户控件 <UserControl x:Class="WpfDemo.User 阅读全文
posted @ 2017-12-30 22:31 Lulus 阅读(3683) 评论(0) 推荐(1)
摘要: <Button Content="指向我" Margin="100"> <Button.ToolTip> <StackPanel> <GroupBox Header="你喜欢什么水果?"> <GroupBox.Content> <StackPanel> <TextBlock>A.苹果</TextBl 阅读全文
posted @ 2017-12-30 22:30 Lulus 阅读(217) 评论(0) 推荐(0)
摘要: 实现折叠列表的效果 <Expander Header="水果列表"> <StackPanel> <RadioButton Content="苹果"></RadioButton> <RadioButton Content="香蕉"></RadioButton> </StackPanel> </Expa 阅读全文
posted @ 2017-12-30 22:29 Lulus 阅读(369) 评论(0) 推荐(0)
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 56 下一页