May
14th | 2008

How To Add a MouseDoubleClick Event To Any WPF Control

Posted by Amit |
Filed under .Net, WPF |

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:

  1. 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:
  2. <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...
Dec
22nd | 2007

How To Use Microsoft Expression Blend to Modify a Control

Posted by Amit |
Filed under .Net, C#, Utilities, WPF |

Hi all.
Say you absolutely have to change the Button of a Combobox to a circle instead of an arrow - you just have to!!!!
Here comes Microsoft Expression Blend to the rescue, If you code in WPF and don’t have it yet, you can get it here, Its the beta of blend 2 but believe [...]


Continue Reading...

Search Dev102