using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using BeWo.View.Detail; using BeWo.View.Detail.Report; using BeWo.ViewModel; using BS.Shared.DataContracts; namespace BeWo.View.Controls { /// /// Interaction logic for MonthPicker.xaml /// public partial class MonthPicker : UserControl { public MonthPicker() { InitializeComponent(); _MonthPicker.ItemsSource = DateTimeFormatInfo.CurrentInfo.MonthNames.Where(s => !string.IsNullOrEmpty(s)); _MonthPicker.SelectedIndex = 0; } public int SelectedMonth { get => _MonthPicker.SelectedIndex + 1; set => _MonthPicker.SelectedIndex = value - 1; } public string SelectedMonthName { get => (string)_MonthPicker.SelectedItem; } } }