using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
namespace Tango.MachineStudio.Technician.Converters
{
///
/// Binding converter for converting TransitionControl child Tag to text style.
///
///
/// This converter is used by the patient page tabs, changing the selected tab text style to bold/normal.
///
public class TransitionLinkConverter : IValueConverter
{
///
/// Converts a ContentControl to font style.
///
/// Content control.
///
///
///
/// Font style.
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
ContentControl control = value as ContentControl;
if (control != null && control.Tag != null && control.Tag.ToString().ToLower() == parameter.ToString().ToLower())
{
return FontWeights.Bold;
}
else
{
return FontWeights.Normal;
}
}
///
/// Not Implemented.
///
///
///
///
///
///
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value;
}
}
}