-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
25 lines (25 loc) · 1.63 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
<Window x:Class="Immutable_Deque_visualization.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Immutable_Deque_visualization"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DataContext="{d:DesignInstance local:DequeViewModel}"
Title="MainWindow" Height="350" Width="800">
<Window.Resources>
<DataTemplate DataType="{x:Type local:DequeNodeBase}">
<Border BorderBrush="Black" BorderThickness="1" MinWidth="10">
<TextBlock Text="{Binding}" Margin="1" HorizontalAlignment="Center" />
</Border>
</DataTemplate>
</Window.Resources>
<DockPanel>
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" HorizontalAlignment="Center">
<TextBox MinWidth="100" Text="{Binding NewNodeValue}" Margin="{StaticResource margin}" />
<Button Command="{Binding EnqueueLeftCommand}" Margin="{StaticResource margin}">Enqueue left</Button>
<Button Command="{Binding EnqueueRightCommand}" Margin="{StaticResource margin}">Enqueue right</Button>
<Button Command="{Binding DequeueLeftCommand}" Margin="{StaticResource margin}">Dequeue left</Button>
<Button Command="{Binding DequeueRightCommand}" Margin="{StaticResource margin}">Dequeue right</Button>
</StackPanel>
<local:DequeControl Deque="{Binding Deque}" HorizontalAlignment="Center" />
</DockPanel>
</Window>