protected override void Apply(RadTreeMapItem treemapItem, object dataItem)
 {
     File file = dataItem as File;
     string extention = System.IO.Path.GetExtension(file.Name).TrimStart('.');
     Brush brush = null;
     ImageBrush image = null;
     if (documents.Contains(extention))
     {
         brush = new SolidColorBrush(Color.FromArgb(0xff, 0x99, 0xB9, 0x4E));
         image = this.GetImage("text.png");
     }
     else if (music.Contains(extention))
     {
         brush = new SolidColorBrush(Color.FromArgb(0xff, 0xF0, 0xB3, 0x2D));
         image = this.GetImage("music.png");
     }
     else if (images.Contains(extention))
     {
         brush = new SolidColorBrush(Color.FromArgb(0xff, 0xDC, 0x81, 0xAC));
         image = this.GetImage("img.png");
     }
     else if (video.Contains(extention))
     {
         brush = new SolidColorBrush(Color.FromArgb(0xff, 0x5A, 0xAB, 0xDC));
         image = this.GetImage("video.png");
     }
     treemapItem.Background = brush;
     Grid grid = treemapItem.ChildrenOfType<Grid>().ElementAt(1);
     grid.Background = image;
 }
Ejemplo n.º 2
0
 protected override void Apply(RadTreeMapItem treemapItem, object dataItem)
 {
     File file = dataItem as File;
     if (dataItem is File)
     {
         treemapItem.Background = new SolidColorBrush(Colors.Red);
     }
     else
     {
         treemapItem.Background = new SolidColorBrush(Colors.Blue);
     }
 }
Ejemplo n.º 3
0
        protected override void Apply(RadTreeMapItem treemapItem, object dataItem)
        {
            File file = dataItem as File;

            if (dataItem is File)
            {
                treemapItem.Background = new SolidColorBrush(Colors.Red);
            }
            else
            {
                treemapItem.Background = new SolidColorBrush(Colors.Blue);
            }
        }
Ejemplo n.º 4
0
 protected override void Clear(RadTreeMapItem treemapItem, object dataItem)
 {
     treemapItem.ClearValue(RadTreeMapItem.BackgroundProperty);
 }
Ejemplo n.º 5
0
 protected override void Clear(RadTreeMapItem treemapItem, object dataItem)
 {
     treemapItem.ClearValue(RadTreeMapItem.BackgroundProperty);
 }