自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 资源 (19)
  • 收藏
  • 关注

原创 WPF给图片加水印

public class WatermarkHelper { string _waterImgPath; BitmapSource _waterPic; string _prefix = null; // constructors public WatermarkHelper(string waterImgF

2013-10-11 21:57:58 2604

原创 WPF 多国语言 localization

因为项目是多国语言的,所以用到了wpf的多国语言相关知识,其实也比较简单,分享给大家,自己也做个备忘。基本步骤如下:1.让界面上所有能够出现的label都使用动态资源(DynamicResource)这样我们在切换语言的时候程序界面上的字符才会自动切换,这里我们举个简单的TextBlock的例子,原本也许你会直接写但是如果需要国际化,那么你需要这样写把原本har

2013-10-08 20:49:16 4301

原创 .Net 小技巧——XmlElement 与 XElement互相转换

XmlElement LinqToXmlElement(XElement xElement) { if (xElement == null) return null; XmlElement xmlElement = null; XmlReader xmlReader = null; t

2013-01-05 10:24:36 3546 1

原创 WPF 数据绑定

WPF中的数据绑定非常的灵活,使用起来也是十分的简单,这里我不扯什么理论知识了发个链接 想仔细研究的同学 可以自己去慢慢看MSDN http://msdn.microsoft.com/zh-cn/library/ms752347(v=vs.100).aspx本文主要是针对那些个想迅速了解数据绑定 直接上手的同学所写,废话不多说 上代码<Window x:Class="Dat

2012-10-19 11:36:07 4512

原创 WPF 列表控件隔行变色

不知道大家在做wpf项目的过程中有没有碰到过需要列表或者表格显示的时候隔行变色的需求 如下图以往做web的时候还是比较容易实现的 给个table写个style就行了下面介绍下在wpf中如何实现以上效果废话不多说 直接上代码前台代码:<Window x:Class="AlternateColor.MainWindow" xmlns="http:

2012-10-18 10:02:38 8639

原创 WPF TreeGrid(树形展开的表格)

一直都想要个树形展开的表格 像这样的今天心血来潮就简单做了个TreeGrid 喜欢的同学可以下载下去自己研究下,其实也比较简单主要就是TreeView TreeViewItem再配合GridViewHeaderRowPresenter、GridViewRowPresenter、GridViewColumnCollection定制style基本上就可以实现以上效果本文中涉及大

2012-10-11 17:03:07 23396 10

原创 WPF触发器(Trigger、DataTrigger、EventTrigger)

WPF中有种叫做触发器的东西(记住不是数据库的trigger哦)。它的主要作用是根据trigger的不同条件来自动更改外观属性,或者执行动画等操作。WPFtrigger的主要类型有:Trigger、MultiTrigger、DataTrigger、MultiDataTrigger、EventTrigger几种。从字面意思上我们想大家已经知道个大概,接下来我将还会用实例代码逐一进行介绍。trig

2012-09-28 18:09:55 46623 3

原创 WPF中的图片文件、byte[]、BitmapImage的操作

public MainWindow() { InitializeComponent(); byte[] b = GetPictureData(@"F:\WPF\TestSolution\TestReatByteFromDB\Images\123.png"); BitmapImage myimg = ByteAr

2012-09-27 09:48:24 12345

转载 .NET文件操作类 (转载)

using System; using System.Collections.Generic; using System.Text; using System.IO; #endregion namespace CommonUtilities { /// /// 文件操作类 /// public class FileHelper {

2012-09-26 17:27:55 1453

原创 WPF线程模型

大家可能会有这样的经历,在做UI开发的时候,遇到一些比较耗时的操作,界面会被卡住(阻塞),用户没有办法操作界面,从而给用户体验打了一个大大的折扣。这样的操作大部分是在取大量数据,或者是在一些文件存取等费时的操作上。那么怎么解决这个问题呢,这个时候就需要使用多线程的编程技术,将UI线程从复杂的任务中解放出来,从而使用户获得更好的用户体验。首先我们必须了解一些基本的概念:在WPF的应用程序中有

2012-09-25 18:51:15 3481 2

原创 WPF拖拽

写一个比较简单的拖拽实例给那些和我一样正在学习wpf的菜鸟们,代码比较粗糙,注意精华部分就行了 其他的可以自动忽略。前台一个itemscontrol空间 里面绑定了一排列表,随便拖动一个到右边的框里,会显示拖动的项目的文字,只是阐述原理,其他的你还可以做很多额外的东东,自己发挥吧。<Window x:Class="TestPro.MainWindow" xmlns="htt

2012-09-24 11:58:54 3471

原创 WPF loading遮罩层 LoadingMask

大家可能很纠结在异步query数据的时候想在wpf程序中显示一个loading的遮罩吧今天就为大家介绍下遮罩的制作源码下载 点击此处先上张效果图看看 如果不如您的法眼 可以移步了 或者有更好的效果 可以留言给我 废话不多说 直接贴代码 一个usercontrol<UserControl x:Class="LoadingMask_Demo.Loadin

2012-09-23 11:29:59 23258 12

原创 WPF中模板(ControlTemplate and DataTemplate)

WPF中的模板是一个特别重要的概念,对于做UI开发的同学来说熟悉ControlTemplate(控件模板) 和DataTemplate(数据模板)是必须掌握的技能,否则就只能做个拖控件的菜鸟。下面就着重介绍下这两类模板的概念和使用。1.ControlTemplate 就是我们常说的控件模板,主要用途是更改控件的外观,比如你要修改一个Button的形状是圆形的,改变背景颜色,定制动画效果等等

2012-09-21 13:58:27 9341

原创 有了它wpf的style可以任你发挥了

前段时间一直在做wpf的UI开发,每次想做些控件style定制的时候都很头疼很多控件不知道他的controltemplate是什么样的为了方便大家写style 特别奉上wpf的style大全从此,妈妈再也不用担心我的wpf,哪里不会点哪里,so easy!下载地址wpf controltemplate demoShared in all filewindow

2012-09-20 11:01:50 12051 3

原创 ControlTemplate in WPF —— DataGrid

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style TargetType="{x:Type B

2012-09-20 11:01:39 3131

原创 ControlTemplate in WPF —— Calendar

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://sch

2012-09-20 11:00:52 3755

原创 ControlTemplate in WPF —— Shared in all file

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">--> <Style x:Key="VerticalHIC"

2012-09-20 11:00:19 2080

原创 ControlTemplate in WPF ——ScrollBar

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> --> --> <Style x:Ke

2012-09-20 10:58:27 1180

原创 ControlTemplate in WPF —— Menu

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://sch

2012-09-20 10:57:38 2506

原创 ControlTemplate in WPF —— Expander

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ControlTemplate x:

2012-09-20 10:56:56 1939

原创 ControlTemplate in WPF —— Window

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> --> <Style x:Key="

2012-09-20 10:55:13 2221

原创 ControlTemplate in WPF —— DatePicker

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <!--In this example, an implecit st

2012-09-20 10:54:01 3238

原创 ControlTemplate in WPF —— TabControl

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://sch

2012-09-20 10:53:14 2507

原创 ControlTemplate in WPF —— TreeView

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> --> <Style x:Key="{x:

2012-09-20 10:52:44 2523 1

原创 ControlTemplate in WPF —— ItemsControl

<ItemsControl Margin="10" ItemsSource="{Binding Source={StaticResource myTodoList}}"> <!--The ItemsControl has no default visual appearance. Use the Template property to specify

2012-09-20 10:52:07 1659

原创 ControlTemplate in WPF —— ListBox

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> --> <Style x:Key="{x:

2012-09-20 10:51:05 2206

原创 ControlTemplate in WPF —— ComboBox

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://sch

2012-09-20 10:49:54 5120

原创 ControlTemplate in WPF —— TextBox

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> --> --> <Sette

2012-09-20 10:48:34 1907

原创 ControlTemplate in WPF —— RadioButton

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> -->

2012-09-20 10:46:56 1519

原创 ControlTemplate in WPF —— Checkbox

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://sch

2012-09-20 10:45:14 1416

PetaPoco-5

PetaPoco-5 一个轻量级的orm框架

2014-04-09

WPF 多国语言 localization

WPF 多国语言 localization 博客文章http://blog.csdn.net/lhx527099095/article/details/12407639

2013-10-08

prism quickstart

prism quickstart

2013-06-13

击剑网代码

一个击剑网

2013-04-01

茹果代码测试

茹果代码测试

2013-03-21

RibbonOneNoteTagReader

wpf读取onenote的tag 并且用ribbon window显示

2013-03-13

web backup

web bakup don‘t download it .thinks

2012-11-08

WPF TreeGrid

博客中会详细介绍 可以看博客http://blog.csdn.net/lhx527099095

2012-10-11

WPF 3d模型优化

WPF 3d模型优化 通过模型合并优化一万个模型缩放不卡

2012-09-23

LoadingMask(WPF加载数据loading遮罩)

LoadingMask(WPF加载数据loading遮罩) 博客地址http://blog.csdn.net/lhx527099095/article/details/8005095

2012-09-23

wpf controltemplate demo

wpf controltemplate demo

2012-09-20

测试代码

测试源代码

2012-07-02

颜色转换小工具

颜色转换的一个小工具 可以把#dfdfddf转换成0xdf,0xdf,0xdd这样 提高生产效率的工具 呵呵

2012-07-01

wpf 缩放加拖拽功能

wpf viewbox 拖拽 缩放例子做参考用

2012-03-10

LoadingMask and messagebox

wpf loadingmask messagebox

2012-02-24

WPFTreeview

wpf treeview checkbox 综合应用

2011-11-30

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除