source: trunk/CrypPlugins/WorkspaceManager/View/Converter/ViewStateIconConverter.cs @ 2803

Last change on this file since 2803 was 2803, checked in by kopal, 11 years ago
File size: 1.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Data;
6using WorkspaceManager.View.Container;
7using System.Windows.Media.Imaging;
8using WorkspaceManager.Model;
9
10namespace WorkspaceManager.View.Converter
11{
12    class ViewStateIconConverter : IValueConverter
13    {
14        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
15        {
16            PluginViewState state = (PluginViewState)value;
17            BitmapImage image = null;
18            if (state == PluginViewState.Min)
19            {
20                image = new BitmapImage(new Uri("../Image/maxi.png", UriKind.RelativeOrAbsolute));
21                return image;
22            }
23            else
24            {
25                image = new BitmapImage(new Uri("../Image/minimize.png", UriKind.RelativeOrAbsolute));
26                return image;
27            }
28        }
29
30        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
31        {
32            throw new NotImplementedException();
33        }
34    }
35}
Note: See TracBrowser for help on using the repository browser.