Jump to content
  • Advertisement
Sign in to follow this  

[.net] How do I add an image to a dataset?

This topic is 2535 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I add an image to a dataset?

This is a C#/Silverlight question although I am trying to emulate what I see in Excel.

In the screen snapsot below, there is an excel file that has little arrow indicators inside the cells of one column. First of all, I do not know how even this can be done. For starters, that would be a good thing to learn. But I need to emulate this in a C# / Silverlight app. How would I put little graphics like this into a dataset/datagrid?


Share this post

Link to post
Share on other sites
In WPF/Silverlight you usually define a template to customize a control visual.For exemple a simple template to show an image and some text.

<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<Image Grid.Column="0" Source="../Images/MyImage.png"/>
<TextBlock Grid.Column="1" Text="{Binding MyValue}"/>

Then you could use that template as a CellTemplate in your DataGrid.

Some materials you may want to read on this topics :

(MSDN) Control Customization

WPF Tutorial

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!