using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace C1DataGrid_Demo2010
{
    public partial class Hyperlinks : UserControl
    {
        public Hyperlinks()
        {
            InitializeComponent();

            var items = new List<Item>
            {
                new Item
                { 
                    Link = "www.microsoft.com", 
                    LinkImage="http://www.microsoft.com/nl-be/msdn/promoteyourapp/resources/css/microsoft/im/store_symbol_clr_52x52.png"
                },
                new Item
                { 
                    Link = "www.bing.com", 
                    LinkImage="http://www.microsoft.com/canada/msn/bing/images/bing_icon.png"
                },
                new Item
                { 
                    Link = "www.google.com", 
                    LinkImage="http://www.google.com/profiles/c/photos/public/AIbEiAIAAABECMuvxL_O4o-c9wEiC3ZjYXJkX3Bob3RvKigzZmYwZjBmN2UxZDQ1MmJkNTg4ZDg3ZjQ3NTUxOTFjZDFhNzYxMTU2MAHZbpvFrv9hD-0kBIss_6QH2NdG1g"
                },
            };
            grid.ItemsSource = items;
        }

        private void DataGridHyperlinkColumn_Click(object sender, C1.Silverlight.DataGrid.DataGridRowEventArgs e)
        {
            msg.Text = string.Format("Hyperlink {0} clicked.", (e.Row.DataItem as Item).Link);
        }
    }


    public class Item
    {
        public string Link { get; set; }
        public string LinkImage { get; set; }
    }
}
