hi all,

wonder if anyone has any advice regarding the best approach to an issue i have with my year long wpf project i'm refactoring (well more a case of understanding what wpf is and what isn't winforms and writing as my understanding increases).

So as not to get took down a specific route i will generalise my control's purpose. I have a uielement which is broken into a grid of 128 columns and 10 rows, the last 3 rows are offset by 1/2 a cells width. each cell contains no more than 2 characters and is coloured according to the value in it, the entire element can move left or right within a clipped uielement and each cell of the nested uielement needs to have tooltips associated with each cell that contain editable text that is edited by right clicking it (left clicking positions the element in the center of the viewing area, which has a box enlosing this selected column of data).

Ok my first attempt was to use labels absolutely positioned (as i would do with winforms) and redraw all visible labels. this worked but is entirely in code behind and is not wpf style.

My next attempt was to use stack panels for the upper and lower regions and to place the labels within vertical stackpanels placing the entire object into a canvas and then nesting that canvas within one i have on the xaml file, this again was done in code behind and is proving to be a nightmare now i need to have editable tooltips too.

My current thinking is to have a tooltip array and use hit testing to determine what on the canvas has been clicked or perhaps to position labels on the canvas in the ui and edit the text/background colours with code behind.

I wish to abstract the ui from the code in a MVVM way, what would you guys think is the way to tackle this one? i am using VB.Net within vs 2010 pro