[corlib] Update ValueTuple implementation
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / ExpandCollapseIsCheckedConverter.cs
1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //----------------------------------------------------------------
4
5 namespace System.Activities.Presentation
6 {
7     using System.Windows.Data;
8     using System.Windows;
9     class ExpandCollapseIsCheckedConverter : IMultiValueConverter
10     {
11         public object Convert(object[] values, Type targetType, object parameter, global::System.Globalization.CultureInfo culture)
12         {
13             bool expandState = (bool)values[0];
14             bool pinState = (bool)values[1];
15             bool showExpanded = false;
16             if (values[2] != DependencyProperty.UnsetValue)
17             {
18                 showExpanded = (bool)values[2];
19             }
20            
21             return showExpanded;
22         }
23
24         public object[] ConvertBack(object value, Type[] targetTypes, object parameter, global::System.Globalization.CultureInfo culture)
25         {
26             //Return ExpandState and PinState.
27             return new object[] { value, true };
28         }
29
30     }
31 }