Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
MainWindow.xaml 1.33 KiB
Newer Older
<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:viewModel="clr-namespace:HashingTool.ViewModel"
	xmlns:views="clr-namespace:HashingTool.Views"
	x:Class="HashingTool.MainWindow"
	Title="VECTO Hashing Tool" Height="552" Width="593">
	<Window.DataContext>
		<viewModel:MainWindowViewModel />
	</Window.DataContext>
	<Window.Resources>
		<DataTemplate DataType="{x:Type viewModel:HashComponentDataViewModel}">
			<views:HashComponentData />
		</DataTemplate>
		<DataTemplate DataType="{x:Type viewModel:VerifyInputDataViewModel}">
			<views:VerifyInputData />
		</DataTemplate>
	</Window.Resources>
	<Grid Margin="10">
		<DockPanel>
			<Border DockPanel.Dock="Left" BorderBrush="Black" BorderThickness="0,0,1,0">
				<ItemsControl ItemsSource="{Binding MainViewModels}">
					<ItemsControl.ItemTemplate>
						<DataTemplate>
							<Grid Margin="0,0,0,5">
								<Button Content="{Binding Name}" Margin="2,5"
										Command="{Binding DataContext.ChangeViewCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
										CommandParameter="{Binding }" />
							</Grid>
						</DataTemplate>
					</ItemsControl.ItemTemplate>
				</ItemsControl>
			</Border>
			<ContentControl Content="{Binding CurrentViewModel}" />
		</DockPanel>