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;
using C1.Silverlight;

namespace VSDev9.Controls
{
    public partial class SolutionExplorer : UserControl
    {
        public event EventHandler FileSelected;

        public SolutionExplorer()
        {
            InitializeComponent();
        }

        public string SelectedFileName 
        {
            get 
            {
                var treeitem = (C1TreeViewItem) tree.SelectedItem;
                var iconText = (IconText) treeitem.Header;
                return iconText.Text.Replace('.', '_');
            }
        }

        private void File_Click(object sender, SourcedEventArgs e)
        {
            if (FileSelected != null)
                FileSelected(this, EventArgs.Empty);
        }


    }
}
