/// <summary> /// Converts a value. /// </summary> /// <param name="value">The value produced by the binding source.</param> /// <param name="targetType">The type of the binding target property.</param> /// <param name="parameter">The converter parameter to use.</param> /// <param name="culture">The culture to use in the converter.</param> /// <returns>Converted value.</returns> public object Convert(object value, Type targetType, object parameter, string language) { SeriesSelectionMode selectionMode = SeriesSelectionMode.None; if ((value is bool) && (bool)value) { selectionMode = SeriesSelectionMode.Single; } return(selectionMode); }
private void OnSelectionModeChanged(SeriesSelectionMode oldValue, SeriesSelectionMode newValue) { if (null != _itemContainer) { switch (newValue) { case SeriesSelectionMode.None: _itemContainer.SelectedItem = null; _itemContainer.SelectionMode = Windows.UI.Xaml.Controls.SelectionMode.Single; break; case SeriesSelectionMode.Single: _itemContainer.SelectionMode = Windows.UI.Xaml.Controls.SelectionMode.Single; break; case SeriesSelectionMode.Multiple: _itemContainer.SelectionMode = Windows.UI.Xaml.Controls.SelectionMode.Multiple; break; } } }