source: trunk/CrypPlugins/WorkspaceManager/View/Converter/IsMouseOverColorConverter.cs @ 2280

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

-fixed "Fit to Screen"
-fixed Scrollbars
-fixed Dragging
-added custom names
-New: IControl- Presentation
--Loading adjusted
-New: Multi selection
-New: Copy /Past (not complete)
-New: Multi Dragging
-New: PluginContainerView Highlighting added

File size: 1.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Data;
6using System.Windows.Media;
7
8namespace WorkspaceManager.View.Converter
9{
10    class IsMouseOverColorConverter : IMultiValueConverter
11    {
12
13        public object Convert(object[] value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
14        {
15            bool IsMouseOver = (bool)value[0], IsSelected = (bool)value[1];
16            BrushConverter bc = new BrushConverter();
17            if (!IsSelected)
18            {
19                if (IsMouseOver)
20                    return (Brush)bc.ConvertFrom("#FFF");
21                else
22                    return (Brush)bc.ConvertFrom("#444");
23            }
24            else
25                return (Brush)bc.ConvertFrom("#FFF");
26        }
27
28        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
29        {
30            throw new NotImplementedException();
31        }
32    }
33}
Note: See TracBrowser for help on using the repository browser.