April 22, 2009
This all started as a requirement for zooming in a chart, then later I decided to make a component out of it – drag select an area.
For the end-user it is really simple: click… select an area by dragging… release!
You can use this anywhere in your application (not only restricted to charts).
It is simple to learn what it does only by playing with my demo.
In seconds you’ll know how to use it: drag-select an area inside the orange rectangle.
All the controls and output are on your left side.
Take a look at the source code to understand more.
Questions and comments are most welcomed.
Demo is here
Source is here
8 Comments |
SilverLight | Tagged: DragSelect, SilverLight, Zoom |
Permalink
Posted by shemesh
March 10, 2009
On my previous post i showed how you can attach a double-click event to any Silverlight object.
using this method i’ll show you how to attach a double click event to a ListBox item.
the problem here is that we don’t have any object that we can count on.
i edited the ListBoxItem template, the only change i’ve done is to add a transparent rectangle above all.
look for it inside the template – its name is “DummyRectForDoubleClick”.
then on the Loaded event of this rectangle i attach to it the double click event.
Demo is here
Source is here
3 Comments |
ListBox, SilverLight | Tagged: ListBox, SilverLight |
Permalink
Posted by shemesh
March 5, 2009
Due to Silverlight lack of double click event a custom implementation is needed.
this function and its adjacent handlers will attach a double click event to any object deriving from UIElement.
Read the rest of this entry »
Leave a Comment » |
SilverLight | Tagged: SilverLight |
Permalink
Posted by shemesh
December 3, 2008
This is a continuation of my last post.
I have made a better version of my ExtendedGridSplitter, this one works in both horizontal and vertical placement, I have made it more reliable and easy to work with.
Plus… I have found this post about animating Grid columns & rows and implemented it in my sample application.
Demo is here
Source is here
6 Comments |
GridSplitter, SilverLight | Tagged: GridSplitter, SilverLight, XAML |
Permalink
Posted by shemesh
November 18, 2008
(Silverlight is much more hard-to-handle then Flex)
This is my first blog about Silverlight !!
Not much to explain here, just look at the code and ask questions.
I have added a button to the GridSplitter by sub-classing it.
Then later I used templates, styles and events to give the collapse button its look and functionality.
Of course you can make everything look better by applying styles (my collapse button is a simple red rectangle).
By handling some simple events I control the collapsing and expanding.
Notice that while dragging the splitter to the far left the button will change its arrow direction.
That was a good lesson.
Demo is here
Source is here
update: i have made a better version of this, look here.
8 Comments |
GridSplitter, SilverLight | Tagged: GridSplitter, SilverLight, XAML |
Permalink
Posted by shemesh