-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMainWindow.xaml
50 lines (47 loc) · 2.54 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<Window x:Class="CurveEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:CurveEditor.Controls"
xmlns:local="clr-namespace:CurveEditor"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" Background="Black">
<Window.DataContext>
<local:MainWindowViewModel/>
</Window.DataContext>
<Window.Resources>
<ResourceDictionary Source="Controls/CurveEditor.xaml"/>
</Window.Resources>
<Grid>
<DockPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<controls:CurveEditor ItemsSource="{Binding ControlPoints}"
MinValue="{Binding MinValue}"
MaxValue="{Binding MaxValue}"
IsClampEnabled="{Binding IsClampEnabled}"
IsRangeEnabled="{Binding IsRangeEnabled}"
IsReadOnlyClampFlag="{Binding IsReadOnlyClampFlag, Mode=OneWay}"
IsReadOnlyRangeFlag="{Binding IsReadOnlyRangeFlag, Mode=OneWay}"
Type="{Binding CurveType}"
IsReadOnlyType="{Binding IsReadOnlyCurveType, Mode=OneWay}"/>
<StackPanel Margin="16,0,0,0">
<TextBlock Text="ViewModel binding properties." Foreground="WhiteSmoke"/>
<ListBox ItemsSource="{Binding ControlPointVMs}" Margin="0,16,0,0" Background="Black">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Foreground="WhiteSmoke">
<TextBlock.Text>
<MultiBinding StringFormat="(Value={0:F4}, RangeValue={1:F4}, t={2:F4})">
<Binding Path="Value"/>
<Binding Path="RangeValue"/>
<Binding Path="NormalizedTime"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</DockPanel>
</Grid>
</Window>