随笔分类 - WPF
摘要:<Window x:Class="GeometryDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winf
阅读全文
posted @ 2018-09-07 17:07
dxm809
摘要:数据绑定模式共有四种:OneTime、OneWay、OneWayToSource和TwoWay,默认是TwoWay。一般来说,完成数据绑定要有三个要点:目标属性是依赖属性、绑定设置和实现了INotifyPropertyChanged接口的数据源(数据上下文)。 OneTime:一次性有效,之后数据源
阅读全文
posted @ 2018-09-05 17:08
dxm809
摘要:前一段半心半意地学习了一下WPF,是从控件入手的,发现巨容易,甚至有些无趣。昨天面试,被问到了很多WPF的特性的东西,直接就傻了。于是乎,还是要去深刻的学习一下WPF。刚刚试了一下数据绑定,几次都没有成功,后来发现是DataContext搞得鬼。 我暂时有两点结论: 1、如果没有显式设置上下文,那么
阅读全文
posted @ 2018-09-05 17:07
dxm809
摘要:IOC 的理解与解释 IOC 是什么? Ioc—Inversion of Control,即“控制反转”,不是什么技术,而是一种设计思想。在Java开发中,Ioc意味着将你设计好的对象交给容器控制,而不是传统的在你的对象内部直接控制。如何理解好Ioc呢?理解好Ioc的关键是要明确“谁控制谁,控制什么
阅读全文
posted @ 2018-08-13 10:15
dxm809
摘要:WPF入门教程系列(二) 深入剖析WPF Binding的使用方法 同一个对象(特指System.Windows.DependencyObject的子类)的同一种属性(特指DependencyProperty)只能拥有一个binding。 这一点可以通过设置binding对象的方法名得知: publ
阅读全文
posted @ 2018-08-13 08:43
dxm809
摘要:WPF入门教程系列(一) 创建你的第一个WPF项目 WPF基础知识 快速学习绝不是从零学起的,良好的基础是快速入手的关键,下面先为大家摞列以下自己总结的学习WPF的几点基础知识: 1) C#基础语法知识(或者其他.NET支持的语言):这个是当然的了,虽然WPF是XAML配置的,但是总还是要写代码的,
阅读全文
posted @ 2018-08-13 08:42
dxm809
摘要:一、什么是WPF? Windows Presentation Foundation(以前的代号为“Avalon”)是 Microsoft 用于 Windows 的统一显示子系统,它通过 WinFX 公开。它由显示引擎和托管代码框架组成。Windows Presentation Foundation
阅读全文
posted @ 2018-08-13 08:40
dxm809
摘要:Model:Employeeusing System.ComponentModel;namespace WpfApplicationBindingSample.Models{ /// /// 业务实体(Business Entity) /// ...
阅读全文
posted @ 2018-07-16 14:50
dxm809
摘要:LayoutTransform会影响布局,让grid显示分割线时候,可以看出 ...
阅读全文
posted @ 2018-07-11 13:03
dxm809
摘要:using System;using System.Collections.Generic;using System.Linq;using ...
阅读全文
posted @ 2018-07-11 13:03
dxm809
摘要:呈现变形的元素并没有改变位置,只是呈现在不同的位置而已,所以动画要用呈现变形好处:为了效率,如果改变位置的话,需要重新测量,布局 ...
阅读全文
posted @ 2018-07-09 09:50
dxm809
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;na...
阅读全文
posted @ 2018-07-09 09:46
dxm809
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;us...
阅读全文
posted @ 2018-07-09 09:46
dxm809
摘要:NewTeacher NewStudent using System;using System....
阅读全文
posted @ 2018-07-09 09:46
dxm809
摘要:RoutedCommand与业务逻辑无关,业务逻辑是通过CommandBinding来实现using System;using System.Collections.Generic;using System.Linq;using System.Text;using S...
阅读全文
posted @ 2018-07-09 09:46
dxm809
浙公网安备 33010602011771号