
WPF
文章平均质量分 86
iteye_13882
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
wpf - example to enhance ComboBox for AutoComplete
first let’s see an example of the code (the behavior code that turns a combobox to a source of autocomplete source) using System;using System.Collections.Generic;using System.Linq;using ...原创 2014-09-19 15:56:19 · 348 阅读 · 0 评论 -
wpf - Get Effective DependencyProperty value on a DependencyObject
As discussed in my previous post, - wpf - Dependency Property Value Precedence, and the original article on Dependency Property Value Precedence; There exists situation where the value of some Depend...原创 2012-08-28 19:05:54 · 134 阅读 · 0 评论 -
wpf - Dependency Property Value Precedence
A dependency property to an DependencyObject may get its value from various source, the type of sources that the DependencyProperty may get include DefaultDefaultStyleDefaultTriggerStyle...原创 2012-08-28 18:56:31 · 140 阅读 · 0 评论 -
wpf - Default(Theme) style and its DefaultStyleKey
As dicsused in the subsection of Default (theme) style from the topic of Dependency Property Value Precedence we know that the theme style use the type as the key for controls; But when theme is appli...原创 2012-08-28 17:54:01 · 233 阅读 · 0 评论 -
wpf - WPF TemplateBinding vs RelativeSource TemplatedParent
This is a post that summarizes the dicussion on WPF TemplateBinding vs RelativeSource TemplatedParent; This is a quote from the original site, however, I may add some verifcation code to attest/affirm...原创 2012-08-28 14:20:05 · 480 阅读 · 0 评论 -
wpf - ICutomTypeDescriptor , PropertyDescriptor and its use in PropertyGrid
The type ICustomTypeDescriptor PropertyDescriptor is widely used in a lots of places, for one, the PropertyGrid, where it allows you to view/sort/filter properties based on different ...原创 2012-08-28 14:04:53 · 391 阅读 · 0 评论 -
wpf - tips to convert UI controls in WPF/Silverlight/Winforms into a Bitmap
In previous discussion, we have covered the following topics Convert from System.Drawing.Icon to System.Media.ImageSource and vice versa wpf - how to create and save any visual element int...原创 2012-08-27 17:44:26 · 150 阅读 · 0 评论 -
wpf - input binding examples
Input binding is the mechanism that you can invoke a command by some input measures, such as mouse input or keyboard input. The concrete classes to InputBindings are MouseBinding and KeyBindin...原创 2012-08-27 11:47:20 · 615 阅读 · 0 评论 -
wpf - RoutedCommand and the CommandManager.
In previous discussion wpf - RoutedCommand use example - we have see the example of how to set up the CommandBindings and how to set the Command to an UIElement and how to create the Commands objects....原创 2012-08-26 22:01:27 · 197 阅读 · 0 评论 -
wpf - RoutedCommand use example
It is always useful to have some common stereotype/boilerplate so that you can copy and paste and start something every quickly. This is for RoutedCommand stenciles/templates. there are thr...原创 2012-08-24 08:25:02 · 240 阅读 · 0 评论 -
wpf - ControlTemplate and AddLogicChild/RemoveLogicalChild
Recently I was trying to debug into one mysterious issue where the DockManager from DevExpress is so slow when certain theme is applied.And I have noticed that there are hotspot such as AddLogicalTre...原创 2013-06-10 15:42:05 · 342 阅读 · 0 评论 -
WPF - Enhanced TabControl - TabControlEx aka Prerendering TabControl
As an opening word, let's check on the background of the Prerendering tab controls. TabControlEx 写道There is a known behavior of TabControl that it will "virtualize" its tabs when they are creat...原创 2013-06-13 13:12:08 · 272 阅读 · 0 评论 -
WPF - Setting foreground color of Entire window
You might as well as I would suppose that if we just set the foreground of a window to something different from its original color, then the whole controls from the window might change as well?well t...原创 2013-06-13 16:00:37 · 173 阅读 · 0 评论 -
wpf - IG xamDataGrid bind to XmlDataProvider with Xml Island
Sometimes you may bind to some XmlDataProvider with the data provided as Xml Island. with XmlDataProvider, you may write something as follow. <XmlDataProvider x:Key="OrderData2" ...原创 2012-12-18 14:28:48 · 185 阅读 · 0 评论 -
-- Reprint and code implementation of WPF virtualization
Followed by the copy of the blog on http://bea.stollnitz.com/blog/?p=338 (with title of UI Virtualization), Joe has created his own blog with some connotation. The article from the original po...原创 2012-06-19 11:19:07 · 162 阅读 · 0 评论 -
wpf - translate winform button/mouse event to wpf events
It is common that we sometimes have to host some winforms controls, things like the you have a WPF control which is called NoitfyIcon where you want to wrap a winform Notify, but to enhance the Winfor...原创 2012-12-12 17:37:01 · 234 阅读 · 0 评论 -
Reprint - MVVM Lambda vs INotifyPropertyChanged vs DependencyObject
THis page is a reprint of the document at http://blog.quantumbitdesigns.com/2010/01/26/mvvm-lambda-vs-inotifypropertychanged-vs-dependencyobject/, under the same title of "MVVM - Lambad vs INotify...原创 2012-06-15 11:01:37 · 209 阅读 · 0 评论 -
C# Convert BitmapFrame to Icon and Vice Versa
In the transition from Winform era to the Wpf era. Different type of image classes are used for icons, buttons images and etc.... The pre-world uses the Icon class (System.Drawing), while the newe...2012-05-23 17:29:49 · 403 阅读 · 0 评论 -
WPF – Virtualization – VirutalizationStackPanel and ItemsPanelTemplate
Topic: WPF – Virtualization – VirutalizationStackPanel and ItemsPanelTemplate标题: WPF – 控件虚拟化- 简单介绍VirutalizationStackPanel和ItemsPanelTemplate在ItemsPanel上的虚拟化, 你可以使用VirutalizationStackPanel, 和 “I...原创 2013-08-05 21:55:03 · 363 阅读 · 0 评论 -
wpf - Customize the grid lines for original wpf Grid control
The System.WIndows.Controls.Grid classes does provide a ShowGridLines method, while it does not provide means to override the style of the grid lines. Ian Oakes has shows some good ways to use...原创 2012-09-27 12:01:24 · 103 阅读 · 0 评论 -
c# - Convert from System.Drawing.Image to System.WIndows.Media.ImageSource
In Previous discussion, we have seen the code Convert from System.Drawing.Icon to System.Media.ImageSource and vice versa System.Windows.Drawing.Image is the base class of and System.Drawing....原创 2012-09-25 14:27:56 · 619 阅读 · 0 评论 -
wpf - BehaviorBase and one use examples
Behavior is something that we have know very good in the past that we can build something into the WPF system. There is Behavior class where can use as a base calss if we want to build our own behavi...原创 2013-06-18 18:41:38 · 137 阅读 · 0 评论 -
wpf - RoutedEvent and EventManager.RegisterClassHandler
Updated: there was a mistake in my impl, I referenced the code in PresentationCore and modified my code based on the findings. Routed Event is a special Event in WPF and Silverlight where th...原创 2012-08-24 08:24:13 · 683 阅读 · 0 评论 -
wpf - addowner details, use and study
You might wonder what does the DependencyProperty.AddOwner do. in Zeeshan Amjad's blog - AddOwner functionality of Dependency Property in WPF he gaves some example. Ialso looked up the MSDN docum...原创 2012-08-23 07:55:34 · 225 阅读 · 0 评论 -
WPF the routed event and routed command
The topic originate/induce/beget/engender from the discussion of the DelegateCommand vs RoutedCommand. However, there are a grand topic covering with first the routed event. Below is transcribed f...原创 2012-08-09 10:27:23 · 232 阅读 · 0 评论 -
Convert XAML Flow Document to XPS with Style (multiple page, page size, header,
The original post is available here: Convert XAML Flow Document to XPS with Style (multiple page, page size, header, margin) XPS is a fixed document format in which pages are pre-for...原创 2012-08-01 15:06:20 · 275 阅读 · 0 评论 -
WPF VisualTreeHelper and LogicalTreeHelper and various.
In this page: Understanding the Visual Tree and Logical Tree in WPF , the difference between the Visual Tree and Logical Tree is discussed. Visual Tree and Logical Tree In summary. Visual...原创 2012-07-31 13:30:49 · 299 阅读 · 0 评论 -
How to inherit XAML style and override property of child element?
The questionhow to inherit XAML style and override some the property of the child element/the problem there is a very good question indeed, times are you need to define a base button that you want th...原创 2012-04-07 21:05:59 · 146 阅读 · 0 评论 -
Convert from System.Drawing.Icon to System.Media.ImageSource and vice versa
with the transition from Winform to WPF, there is rising/upsurging demand to convert from System.Drawing.Icon to System.Media.ImageSource and vice versa (you cannot rule out the possibility to host ne...原创 2012-07-23 19:06:30 · 203 阅读 · 0 评论 -
zz - A base class for custom WPF binding markup extensions
In author's original post, there is one article that describe a base class that you can extend to create some Custom Binding markup extension. Markup Extension is something like this in .xaml "{B...原创 2012-07-19 11:59:24 · 162 阅读 · 0 评论 -
Use an attached Property to set Resources/Styles
Suppose that you have a UserControl and you want to merge some resources (which defines the styles, template and etc). Suppose again that we cannot add the style to Application or Window, whereas...原创 2012-07-18 21:43:19 · 113 阅读 · 0 评论 -
WPF Dynamically load resource
In Previous post , we discussed how to load resource that is embedded in the wpf application. see How to use embedded Resource in WPF. Here we are going to discuss another approach, where you can ...原创 2012-07-18 18:51:43 · 143 阅读 · 0 评论 -
How to use embedded Resource in WPF
NOTE: do not confuse the embedded resource and the Resource in WPF. Embedded Resource is an old term that is used in Windows Form application, while the Resource is used in WPF. Please see "Embedd...原创 2012-07-18 17:24:59 · 202 阅读 · 0 评论 -
Repost MVVM Infrastructure: DelegateCommand
The original post is available here: MVVM Infrastructure: DelegateCommand; it is one of the quartet of Kent Boogaart's MVVM pattern's infrastructure. the reason to respost the thread is because ...原创 2012-08-09 12:15:11 · 151 阅读 · 0 评论 -
wpf - specify enum values in xaml
Many a situation you find that you are in wantting to put some enum values into the xaml files, there are basically two ways.. one is the Property element where you can directly create values of th...原创 2013-05-08 11:31:34 · 222 阅读 · 0 评论 -
wpf - Style setter on the attached property
I believe that you are familiar with the setter in wpf, which enables to set properties of the target control so that you can control the visual/content/template of the controls, normally what you wi...原创 2013-05-08 14:54:43 · 338 阅读 · 0 评论 -
wpf - Draw Windows Forms controls
Following the discussion on this topic that I previous published: Convert from System.Drawing.Icon to System.Media.ImageSource and vice versa , which we discussed the possibility to convert a System....原创 2012-08-23 07:55:02 · 137 阅读 · 0 评论 -
PropertyDescriptor and DependencyPropertyDescriptor
from MSDN: PropertyDescriptor provides an abstraction of a property on a class DepednencyPropertyDescriptor provides an extension to PropertyDescriptor that accounts for the additional propert...原创 2012-08-23 07:54:40 · 246 阅读 · 0 评论 -
wpf - bind to self, parent or sibling
It is very common that you may use your self as the data context, and you have some controls in the class that bind to data of the containing class. Bind to Parent There are so many way to ac...原创 2012-08-22 21:57:24 · 100 阅读 · 0 评论 -
C# - Button with image as the visual
it is sometime useful to use a imgae as the content of the Button, a picture has more meaning than the humdrum buttons. Below shows how you can make such a button. You first define a button s...原创 2012-08-22 14:47:00 · 135 阅读 · 0 评论