MainWindow.xaml:
Code:<Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <StackPanel> <ComboBox ItemsSource="{Binding Converters}" DisplayMemberPath="TemperatureScaleAbbreviation" SelectedItem="{Binding SelectedConverter}"/> <TextBox Text="{Binding Temperature, UpdateSourceTrigger=PropertyChanged}" /> <Label Content="Fahrenheit" /> <TextBlock Text="{Binding CalculatedTemperatures.Fahrenheit, StringFormat=n2}" /> <Label Content="Celsius" /> <TextBlock Text="{Binding CalculatedTemperatures.Celsius, StringFormat=n2}" /> <Label Content="Kelvin" /> <TextBlock Text="{Binding CalculatedTemperatures.Kelvin, StringFormat=n2}" /> <Label Content="Ren" /> <TextBlock Text="{Binding CalculatedTemperatures.Ren, StringFormat=n2}" /> <Label Content="Ram" /> <TextBlock Text="{Binding CalculatedTemperatures.Ram, StringFormat=n2}" /> </StackPanel> </Window>




Reply With Quote