Creating custom grid control in Silverlight - silverlight-4.0

I need to create a custom grid like control in Silverlight which shows data, in the following format.
Each Cell will contain the value that represents the intersection. How can I do this with silverlight?
PS: The numbers don't mean real values.

Related

windows 8 app page that has list and details

I am now designing a page for a windows 8 app.
the page has 2 parts, the left part will be like a list, when user select one item in the list, the right part will show the content based on the selection.
but I want to select different item in the left will display the different data in the right. For example, maybe select first item in the list, some text blocks will display on the right. select second item , an image will display on the right.
the data in the behind is a class which has some properties. I just want show this properties based on the selection in the list
so how to implement this? anyone has any idea?
thanks!
In the item template, create controls in separate panels for each different data type: text, image, video, etc. Then you can use a converter on each panel to inspect the data that it is bound to and show/hide the panels where appropriate. Depending on your data source, you might be evaluating either the class type or a property that contains an enumerated value that reveals the type, or maybe some more complex evaluation of the state of the class's properties.
One of the templates that comes with Visual Studio Express for Windows 8 supports this list and details view - look at the Split App template.
For more information, see:
http://msdn.microsoft.com/en-us/library/windows/apps/hh738343.aspx

How can a custom web part read the list item fields in a display/edit form?

I need to create a custom web part and programmatically attach to the display and edit forms of a list. The web part is meant to display some information (coming from another list) about the list item being displayed on the form.
I know how to add the web part to the list programmatically, but I'm having an issue trying to get the web part to read the list item being displayed on from. I know the SPForm object exposes its parent list but I cannot or don't know how to convert the form to an SPForm object. The parent of the web part is the web part manager and the parent of that is the HTML form object. But when I try convert that to an SPForm object it throws an error.
Also, even if I manage to get hold of the SPForm and its parent list, how can I get hold of the list item being displayed?
Please bear in mind that I need to avoid overwriting the default forms as it will significantly increase the development time.
Any help or idea is appreciated.
Regards

Blend/VS designer support for adding complex content based on boolean property

I have my own derived WPF DataVisualization chart control and within that control, I have a boolean property that the designer can set which in turn creates and adds a line series to that chart control.
Now the problem is that I can easily create the line series object within the chart when the designer sets that property, but I also need to insert a complex xaml segment into the .xaml file associated with that newly created line series. Is there a way to automatically insert that xaml code into the xaml file when that boolean property is set in the blend designer?
Thanks
Leo
By default, the only properties you can expose are individual attributes on existing elements. There is no provision to insert new elements based on attribute changes. You only add elements by inserting new controls etc.
Create an extension for Expression Blend:
To do what you want you would need to create a plugin for Expression Blend. If you are in a position to do that then anything is possible (add entirely new tools and properties for instance):
Try this link for starters

Create List of Control Groups in VB.Net?

I'm building an control interface for a system that consists of 1-4 modules. In my interface, each module has its own control set, grouped in a groupbox. I only want to show the control groups for the modules that are actually connected and hide the rest.
This is easy to do with the visble property.
I also want all of the groups to be stacked vertically in the UI such that when one is hidden, the rest below it shift up into its place as if you deleted a row in a table. It needs to be able to come back just as easily.
How can I do this or something similar in VB.Net?
The FlowLayoutPanel control does this automatically. Just put the group boxes inside of it.

Porting a VB6 application with msflexgrid to vb.Net

I am porting a vb6 application to VB.net. One of the key forms has a large msflexgrid on it - about a 1000 columns and 50 rows. It has 2 header rows - the first header row has merged cells to form a main header and the second row has sub headings. There is no requirement for any data entry and it's unbound. The code does the work in deciding what to display (if anything) in each cell. It is solely used to display data in the form of a character and a coloured background and to display a tooltip text with more information when you mouse over it. Works beautifully in vb6.
I'm trying to decide whether to:
a) use the vb6 msflexgrid in the .net version
b) use the datagridview - which at a first glance seems to have a problem merging the cells on the header row
c) build my own custom control to do the job
Has anyone got any suggestions for the best approach?
I would suggest using the DataGridView, primarily because using COM objects in .NET is a pain. There is a MSDN page for exactly what you want to do here, and some additional discussion here.