Как получить элемент, который выбран в ListBox?
MainWindow.xaml
<ListBox Name="release_date" Margin="475,135,192,329">
<ListBoxItem Background="LightGray">2021</ListBoxItem>
<ListBoxItem Background="LightGray">2020</ListBoxItem>
<ListBoxItem Background="LightGray">2019</ListBoxItem>
<ListBoxItem Background="LightGray">2018</ListBoxItem>
<ListBoxItem Background="LightGray">2017</ListBoxItem>
</ListBox>
MainWindow.xaml.cs
uint RELEASE_DATE = ... //хотелось бы видеть здесь число 2019
Как он выглядит: