source: trunk/CrypPlugins/WorkspaceManager/View/Converter/DragDeltaViewStateConverter.cs @ 1991

Last change on this file since 1991 was 1991, checked in by matkovic, 11 years ago

-fixed pathfinding
-fixed line drawing
-added Colorpicker
-fixed lock/unlock at TextInputWrapper
-feature: Background and TextForeground in TextInputWrapper added
-fixed a issue With loading and such
-WorkspaceModel doesn't throw exception anymore (Samples functional again)
-fixed some Styles
-Startable implemented and loaded right
-Startable Logo moved

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;
8
9namespace WorkspaceManager.View.Converter
10{
11    class DragDeltaViewStateConverter : IValueConverter
12    {
13        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
14        {
15            PluginViewState State = (PluginViewState)value;
16            string Target = (string) parameter;
17
18            if (State != PluginViewState.Min)
19            {
20                if (Target == "IsEnabled")
21                    return true;
22                if(Target == "Visibility")
23                    return Visibility.Visible;
24            }
25            else
26            {
27                if (Target == "IsEnabled")
28                    return false;
29                if (Target == "Visibility")
30                    return Visibility.Collapsed;
31            }
32
33            return null;
34        }
35
36        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
37        {
38            throw new NotImplementedException();
39        }
40    }
41}
Note: See TracBrowser for help on using the repository browser.