The representation of how to use MVVM architecture the right way!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.6 KiB

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SignalsMVVM.Assets"
xmlns:model="clr-namespace:SignalsMVVM.Models"
xmlns:converters="clr-namespace:SignalsMVVM.UI.Converters">
<converters:HertzConverter x:Key="HertzConverter"/>
<DataTemplate DataType="{x:Type model:AmSignal}">
<StackPanel Margin="10" Grid.Column="0" Grid.Row="1">
<TextBlock Text="AmplModValue: "/>
<TextBox Text="{Binding AmplModValue}"/>
<TextBlock Text="Частота: "/>
<TextBox Text="{Binding Frequency, Converter={StaticResource HertzConverter}}"/>
<TextBlock Text="Задержка: "/>
<TextBox Text="{Binding Delay}"/>
<TextBlock Text="Амплитуда: "/>
<TextBox Text="{Binding Amplitude}"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="{x:Type model:FmSignal}">
<StackPanel Margin="10" Grid.Column="0" Grid.Row="1">
<TextBlock Text="FreqModValue: "/>
<TextBox Text="{Binding FreqModValue}"/>
<TextBlock Text="Частота: "/>
<TextBox Text="{Binding Frequency, Converter={StaticResource HertzConverter}}"/>
<TextBlock Text="Задержка: "/>
<TextBox Text="{Binding Delay}"/>
<TextBlock Text="Амплитуда: "/>
<TextBox Text="{Binding Amplitude}"/>
</StackPanel>
</DataTemplate>
</ResourceDictionary>