Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7608363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:53:41+00:00 2026-05-31T00:53:41+00:00

i am trying to create a list of users in Silverlight in which i

  • 0

i am trying to create a list of users in Silverlight in which i want to show their Image, Name, Score etc.

I used this code to draw a datagrid so that i looks like a list :

     <sdk:DataGrid Grid.Row="1" x:Name="KitchenChart" HorizontalAlignment="Center" AutoGenerateColumns="False" ItemsSource="{Binding KitchenScore}" Background="Black"
             AlternatingRowBackground="Black" GridLinesVisibility="Horizontal">
                <sdk:DataGrid.Columns>
                    <sdk:DataGridTemplateColumn Header="Image" IsReadOnly="True">
                        <sdk:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Background="Black">
                                    <Image Source="{Binding Image}" />                                
                                </StackPanel>
                            </DataTemplate>
                        </sdk:DataGridTemplateColumn.CellTemplate>
                    </sdk:DataGridTemplateColumn>
                    <sdk:DataGridTemplateColumn Header="Name">
                        <sdk:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Background="Black">
                                    <TextBlock  Padding="5,0,5,0" Text="{Binding Name}" Foreground="White"/>
                                </StackPanel>
                            </DataTemplate>
                        </sdk:DataGridTemplateColumn.CellTemplate>
                    </sdk:DataGridTemplateColumn>
                    <sdk:DataGridTemplateColumn Header="Score">
                        <sdk:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Background="Black">
                                    <TextBlock Padding="5,0,5,0" Text="{Binding Score}" Foreground="White" HorizontalAlignment="Stretch"/>
                                </StackPanel>
                            </DataTemplate>
                        </sdk:DataGridTemplateColumn.CellTemplate>
                    </sdk:DataGridTemplateColumn>
                </sdk:DataGrid.Columns>
            </sdk:DataGrid>

And the i used class to load dynamic data in datagrid using this as :
public class KitchenScoreClass
    {
        public Image Image { get; set; }
        public string Name { get; set; }
        public int Score { get; set; }
        public KitchenScoreClass(Image Image, string Name, int Score)
        {
            this.Image = Image;
            this.Name = Name;
            this.Score = Score;
        }
    }

and then i created a function which loads all the data dynimically

private List<KitchenScoreClass> KitchenScore()
        {
            List<KitchenScoreClass> avgg = new List<KitchenScoreClass>();

            avgg.Add(new KitchenScoreClass( ??? ,"kundan",10));
            avgg.Add(new KitchenScoreClass( ??? , "me", 15));
            avgg.Add(new KitchenScoreClass( ??? , "varun", 10));

            return avgg;
        }

and at last used this function to add data to datagrid KitchenChart as:

 public ScoreCharts()
        {
            InitializeComponent();
            KitchenChart.ItemsSource = KitchenScore();
        }

But i don’t know how should i add images ? Suppose all my images are stored in a folder Mysolution/MyImgs along with my solution folders.
How can i add Images ?

Please help

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:53:42+00:00Added an answer on May 31, 2026 at 12:53 am

    Add the image column using “DataGridTempalteColumn.” Add a cell template and create an image object to display the image in the cell. For example:

    <data:DataGridTemplateColumn>
    
    <data:DataGridTemplateColumn.CellTemplate>
    
    <DataTemplate>
    
    <Image x:Name="picture" ImageFailed="picture_ImageFailed" Width="200" Height="130" Visibility="Visible"/>
    
    </DataTemplate>
    
    </data:DataGridTemplateColumn.CellTemplate>
    
    </data:DataGridTemplateColumn>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a list where I want users to enter data
I am trying to create a list of a certain type. I want to
I am trying to create an app that has a list of users and
I'm trying to create a 'search box' that matches users by name. The difficulty
I'm trying to create a query which uses a list of ids in the
I'm trying to create a simple web-application, which allows users create topics and comment
I'm trying to create two dropdownlist, the first one with a list of users,
I'm trying to create a database system where users can create lists, and their
I'm trying to create an image button that, when pressed, presents the users a
I am trying to create an application which retrieves the users favourite book quote

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.