Silverlight: GridSplitter with a collapse button

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.


Charts zoom / range selector (version 2)

August 27, 2008

this is the second chart range selector.
some of the code here is also borrowed from somewhere (sorry for not remembering who from).

Demo is here
Source is here


Charts zoom / range selector (version 1)

August 25, 2008

(long time… working now with Silverlight, I thought to jump back to the fun stuff)

This is a simple range selector on a chart, to be used for zooming in my case.
It is very simple and some of the code is borrowed (I can’t remember where from), nothing fancy here but I wanted to publish it for all to see.

As the title implicit I have another, different, range selector… will publish soon.

Demo is here (right click for source)
Source is here


now also working with M$ Silverlight

July 23, 2008

i have started developing an application using Silverlight.
i will not go into the pros and cons, nor am i going to make any comparison between the two.
it is not relevant for me.
Silverlight is part of my requirements!

don’t call me a traitor, its hard for as it is.

any way… from now on i will blog on both Flex & Silverlight.

the essence for my posts will stay the same: sharing my knowledge and my findings.

here are couple thing for a start:
NavFx – navigation framework for Silverlight.
Visifire – charting library for Silverlight.


dragging the chart’s data points and the whole series

July 18, 2008

suppose you have a chart with a line series that represents some data and thresholds OK/Warning.
now what if the whole data in the chart is to be changed by the user.
of course you can supply her with some DataGrid to reflect the data and make the cells editable, then reflect the edited data back to the chart.

but we are talking Flex here.
wouldn’t it be so much cooler and usable if she can just drag the data around on the chart?!

this was pretty easy to achieve.

the whole line series (black) can be dragged up/down along the Y axis.
each data point on both area series (OK/Warning thresholds) can be dragged.
on the DataGrid you can see the data reflected from the chart in real-time.

Demo is here (right click for source)
Source is here


programmatically showing data tips on a chart – the easy way

July 17, 2008

looks like i have taken the scenic road.

a while ago i have posted about how to “programmatically showing data tips on a chart“.

there is an easier way, well… it’s much-much easier.

dataTipItems is a property for Series. it is an array on non-interactive data tips.
populate it with chart items, then set the chart’s showAllDataTips to true.
that easy.

(i enjoy riding the scenic road)

Demo is here (right click for source)
Source is here