135 lines
6.7 KiB
XML
135 lines
6.7 KiB
XML
<Window x:Class="DicomViewer.Views.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"
|
|
d:DataContext="{d:DesignInstance Type=viewModels:MainWindowViewModel}"
|
|
xmlns:viewModels="clr-namespace:DicomViewer.ViewModels"
|
|
xmlns:oxy="http://oxyplot.org/wpf"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
mc:Ignorable="d"
|
|
Title="Dicom Viewer"
|
|
Height="450"
|
|
Width="800">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<ToolBarTray Grid.Row="0">
|
|
<ToolBar Style="{StaticResource MaterialDesignToolBar}"
|
|
ClipToBounds="False">
|
|
<Button Click="OpenButtonOnClick"
|
|
Content="{materialDesign:PackIcon Kind=FolderOpen}" />
|
|
</ToolBar>
|
|
</ToolBarTray>
|
|
<Grid Grid.Row="1"
|
|
Background="{StaticResource BackgroundColorBrush}"
|
|
PreviewMouseWheel="OnPreviewMouseWheel">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ScrollViewer Grid.Column="0"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<ItemsControl HorizontalAlignment="Left"
|
|
ItemsSource="{Binding ImageList}"
|
|
Margin="10">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
Foreground="{StaticResource White1Brush}"
|
|
Text="{Binding }" />
|
|
<RadioButton GroupName="MainWindowTabs"
|
|
BorderBrush="{StaticResource White1Brush}"
|
|
Checked="ToggleButtonOnChecked"
|
|
Margin="10" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
<Grid Grid.Column="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<oxy:PlotView Grid.Row="0"
|
|
Model="{Binding CbfPlotModelModel}"
|
|
VerticalAlignment="Top"
|
|
Height="450"
|
|
Width="450" />
|
|
|
|
<ItemsControl Grid.Row="1"
|
|
Margin="0, 10"
|
|
VerticalAlignment="Bottom"
|
|
HorizontalAlignment="Left"
|
|
ItemsSource="{Binding PixelInfoList}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Columns="3" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<UniformGrid Width="250"
|
|
Columns="2">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
Foreground="{StaticResource White1Brush}"
|
|
Margin="10, 0"
|
|
Text="{Binding Name}" />
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
Foreground="{StaticResource White1Brush}"
|
|
Margin="10, 0"
|
|
Text="{Binding Value}" />
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
<Grid Grid.Column="1">
|
|
<Image VerticalAlignment="Stretch"
|
|
x:Name="Image"
|
|
MouseUp="OnImageMouseUp"
|
|
MouseMove="OnImageMouseMove"
|
|
RenderOptions.BitmapScalingMode="HighQuality"
|
|
Opacity="0.5"
|
|
Margin="8, 0"
|
|
Source="{Binding CurrentImage.Image, FallbackValue={x:Null}}" />
|
|
|
|
<TextBlock Foreground="{StaticResource White1Brush}"
|
|
VerticalAlignment="Bottom"
|
|
HorizontalAlignment="Right"
|
|
Text="{Binding CursorPosition}"
|
|
Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
d:Text="1, 9" />
|
|
|
|
<StackPanel Orientation="Horizontal"
|
|
Margin="10, 0"
|
|
VerticalAlignment="Bottom">
|
|
<TextBlock Foreground="{StaticResource White1Brush}"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="{Binding CurrentIndex}"
|
|
Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
d:Text="1" />
|
|
<TextBlock Foreground="{StaticResource White1Brush}"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="/"
|
|
Style="{StaticResource MaterialDesignBody1TextBlock}" />
|
|
<TextBlock Foreground="{StaticResource White1Brush}"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="{Binding MaxIndex}"
|
|
Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
d:Text="20" />
|
|
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|