Beispiel #1
0
        private TreeViewItem GetFileItem(string text, bool image)
        {
            var h = new MediaPanelItemHeader();

            h.Text = text;
            var item = new TreeViewItem();

            item.Style             = (Style)Application.Current.Resources["TreeViewItemMediaThree"];
            item.IsVisibleChanged += Item_IsVisibleChanged;

            if (image)
            {
                item.MouseDoubleClick += Image_MouseDoubleClick;
                h.Image = imageImage;
            }
            else
            {
                item.MouseDoubleClick += Sound_MouseDoubleClick;
                h.Image = soundImage;
            }

            item.Header = h;

            return(item);
        }
Beispiel #2
0
        private TreeViewItem GetFolderItem(string text)
        {
            var h = new MediaPanelItemHeader();

            h.Text  = text;
            h.Image = folderClose;
            var item = new TreeViewItem();

            item.Style  = (Style)Application.Current.Resources["TreeViewItemMediaTwo"];
            item.Header = h;

            return(item);
        }