随笔分类 - WPF
摘要:/// <summary> /// 添加资源到程序环境中 /// /Library.Name;component/Themes/{0}Theme.xaml /// </summary> /// <param name="path">资源路径</param> public static void Up
阅读全文
摘要:<Grid> <Grid.RowDefinitions> <RowDefinition Height="auto" /> <RowDefinition /> </Grid.RowDefinitions> <ToggleButton Grid.Row="0" Width="40" Height="22
阅读全文
摘要:界面总览 gitee 地址:WPFMVVM: 使用mvvm模拟实现数据增删改查 (gitee.com) 本例中包含两个View 界面:MainWindow.xaml 数据列表界面,StudentView.xaml数据新增编辑界面 本例使用了命令绑定MvvmLight RelayCommand模拟数据
阅读全文
摘要:<Window.Resources> <DataTemplate x:Key="DefualtTemplate"> <StackPanel Orientation="Horizontal" > <Border Height="10" Width="10" Background="{Binding C
阅读全文
摘要:前端代码 <Grid> <DataGrid Name="gd" CanUserSortColumns="True" AutoGenerateColumns="False" CanUserAddRows="False"> <DataGrid.Columns> <DataGridTextColumn B
阅读全文
摘要:<Window.Resources> <Style TargetType="Button"> <Style.Setters> <Setter Property="Height" Value="30" /> <Setter Property="Width" Value="50" /> <Setter
阅读全文
摘要:依赖属性 1、是不具有数据绑定,动画,样式控件支持上述特性(自定义控件支持数据绑定,动画等)。 2、依赖属性和CLR属性在内存的使用上是截然不同的,每个CLR属性都包含一个非static的字段,因此当我们实例化一个类型的时候,就会创建该类型所拥有的所有CLR属性,也就是说一个对象所占用的内存在调用n
阅读全文
摘要:<Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200
阅读全文
摘要:<Grid> <StackPanel Margin="5" Name="cooos" DataContext="{x:Static SystemFonts.IconFontFamily}"> <TextBlock Text="{Binding Path=Source }"></TextBlock>
阅读全文
摘要:控件模板ControlTemplate,有两部分:VistualTree视觉树,即是能看到的外观;Trigger触发器,里面包括外部条件达到某一条件下会引起的响应。 <Window.Resources> <ControlTemplate x:Key="ButtonTempalted" TargetT
阅读全文

浙公网安备 33010602011771号