1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //----------------------------------------------------------------
5 namespace System.Activities.Presentation
7 using System.Windows.Data;
9 class ExpandCollapseIsCheckedConverter : IMultiValueConverter
11 public object Convert(object[] values, Type targetType, object parameter, global::System.Globalization.CultureInfo culture)
13 bool expandState = (bool)values[0];
14 bool pinState = (bool)values[1];
15 bool showExpanded = false;
16 if (values[2] != DependencyProperty.UnsetValue)
18 showExpanded = (bool)values[2];
24 public object[] ConvertBack(object value, Type[] targetTypes, object parameter, global::System.Globalization.CultureInfo culture)
26 //Return ExpandState and PinState.
27 return new object[] { value, true };