Hi all
As you all remember in my article about Custom WPF Context Menu I mentioned that my WPF Binding Converter was a singleton, and I promised to tell you why, so here comes the 3 ways I know of using WPF Binding Converters. We will start from the worst (in my opinion) and move on the the best.
To start off here is the Binding Converter:
Continue Reading...
We have all used WPF DataTemplates, but I bet most of you never gave thought to the meaning of the x:Key attribute. We all know the meaning of the DataType attribute, which determines to what type of data the template will apply to. But what about the x:Key why is it there? Lets tale a look at the following code:
<Window.Resources>
<DataTemplate DataType=”{x:Type data:s}”>
<Button Width=”50″ Height=”50″>
<TextBlock Text=”{Binding text}”></TextBlock>
</Button>
</DataTemplate>
</Window.Resources>
<Canvas>
<ItemsControl ItemsSource=”{Binding}”>
</ItemsControl>
</Canvas>
Continue Reading...
Last week I was in the need to use a WPF TextBox that had multi line capabilities. I started Typing Multi and hit CTRL + Space to get the intelisense and I was shocked! No MultiLine TextBox, I did get the following:
But no MultiLine TextBox
1: <MultiBinding></MultiBinding>
2: <MultiBindingExpression></MultiBindingExpression>
3: <MultiDataTrigger></MultiDataTrigger>
4: <MultiTrigger></MultiTrigger>
Continue Reading...
SVG (Scalable Vector Graphics) is an open W3C standard for graphics file format and Web development language based on XML. Those image are made up of lines, curves and other “smooth” elements so when you zoom in on a SVG it stays smooth (unlike GIF, JPEG, PNG).
Imagine you can draw some of your user interface elements in a vector drawing application like: Adobe, InkScape (free) or Skencil (free) and convert your work into WPF XAML or Silverlight XAML. ViewerSVG (SVG to xaml converter) is your tool.

Continue Reading...
Master-Detail is a pattern for displaying details of a specific item selected from a list of items. In this post I’ll demonstrate how to use master-detail in WPF with two levels of objects, each displayed in a ComboBox and Data Binding to tie them together.
Continue Reading...
We all know the propertyGrid control, which provides a user interface for browsing the properties of an object. What about having a WPF propertyGrid? Well, yesterday I noticed that there is a work in progress on an open source WPF property grid. Tomer Shamam announced in his blog Essential WPF that he accepted Microsoft Israel OPEN UP challenge (open source contest) and created a new project - WPF property grid. As he stated, it is currently only a Proof of concept and the interface and its usage may change in next releases. I think that its worth tracking…
Continue Reading...
During the past couple of weeks we noticed that whenever we tweak our theme or change something in one of our posts, it causes some pages to become XHTML invalid. We came to think that you never know where it is going to hit you, so we sat down and created a small application which helps you keep all your pages XHTML valid. We checked it on our sitemap, and seems we have some HTML work to do :).
This application is written in WPF and is based on the .Net Framework 3.5.
It will allow you to validate you entire sitemap in one click. The validation is done through the W3C validation SOAP service, so you can trust it :).
Continue Reading...
Last week I was faced with a problem. I needed to implement a MouseDoubleClick Event on a WPF Grid. I said Ha, easy but as i went on to implement it i realized that the Grid has no MouseDoubleClick Event! So how am I supposed to implement it? I came up with 2 solutions and so here goes:
-
the first thought i had was to create a User Control that held only a grid and implement the MouseDoubleClick on the User Control itself so what you will get is this Xaml code:
<UserControl x:Class=”CustomDoubleClick.GridWrapper”
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
Height=”300″ Width=”300″>
<Grid>
</Grid>
</UserControl>
Since the Grid takes the…
Continue Reading...
DataTemplates are a great feature introduced in WPF, it allows to determine how data is presented and how data binding accesses the presented data. Just as we can apply a visual style to a specific UI control, we can do it for a specific data type. There is just one problem here, DataTemplates are good [...]
Continue Reading...