Skip to content

Commit

Permalink
Merge pull request #1 from mdickerson110/Fix-Orientation
Browse files Browse the repository at this point in the history
Fix Orientation and other issues
  • Loading branch information
mdickerson110 authored Oct 11, 2016
2 parents 8796295 + cd83a38 commit 03e9fc9
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 138 deletions.
139 changes: 82 additions & 57 deletions IImage3d_GuiClient/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Window x:Class="IImage3d_GuiClient.MainWindow"
<Window x:Class="IImage3d_GuiClient.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:local="clr-namespace:IImage3d_GuiClient"
Title="MainWindow" Height="750" Width="1125">

<!-- Main grid -->
<Grid Background="Black" SnapsToDevicePixels="True">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="350" /> <!-- Image description-->
<ColumnDefinition Width="350" />
<!-- Image description-->
<ColumnDefinition Width="350" />
<ColumnDefinition Width="350" />
</Grid.ColumnDefinitions>
Expand All @@ -31,47 +32,51 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<Label Grid.Row ="0" Grid.ColumnSpan="2" Style="{StaticResource TitleTextStyle}" Content="IImage3d Image Viewer" />

<!-- Static Image Specs catagories -->
<StackPanel Grid.Column="0" Grid.Row="1" Margin="6,2,2,2">
<Label Style="{StaticResource headerTextStyle}" Content="Image Specifications" />
<ItemsControl x:Name="imageInfoCategoryItems" Style="{StaticResource specTextStyle}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,0,5">
<TextBlock Text="{Binding description}" /> <!-- Get info from Code Behind -->
<TextBlock Text="{Binding description}" />
<!-- Get info from Code Behind -->
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- Variable Image Specs catagories -->
<!-- Variable Image Specs catagories -->
<Label Style="{StaticResource headerTextStyle}" Content="Current Display" />
<ItemsControl x:Name="dimensionCategoryItems" Style="{StaticResource specTextStyle}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,0,5">
<TextBlock Text="{Binding description}" /> <!-- Get info from Code Behind -->
<TextBlock Text="{Binding description}" />
<!-- Get info from Code Behind -->
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>

<!-- Static image Specs -->
<StackPanel Grid.Column="1" Grid.Row="1" Margin="2,2,2,2" >
<Label Style="{StaticResource headerTextStyleBlack}" Content="Filler" /> <!-- Blank filler header -->
<Label Style="{StaticResource headerTextStyleBlack}" Content="Filler" />
<!-- Blank filler header -->
<ItemsControl x:Name="imageInfoValueItems" Style="{StaticResource specTextStyle}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0,0,0,5">
<TextBlock Text="{Binding description}" /> <!-- Get info from Code Behind -->
<TextBlock Text="{Binding description}" />
<!-- Get info from Code Behind -->
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- Variable image Specs (change with user input) -->
<!-- Variable image Specs (change with user input) -->
<Label Style="{StaticResource headerTextStyleBlack}" Content="Filler" />
<ItemsControl x:Name="dimensionValueItems" Style="{StaticResource specTextStyle}">
<ItemsControl.ItemTemplate>
Expand All @@ -97,7 +102,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Canvas x:Name="noFrameCanvas" Grid.ColumnSpan="3" Grid.RowSpan="2" Background="Black" />

<!-- Frame slider -->
<Slider x:Name="frameSlider" Grid.Row="0" Grid.ColumnSpan="3"
Value="0" ValueChanged="frameSlider_ValueChanged"
Expand Down Expand Up @@ -127,33 +132,39 @@
<TextBox Grid.Row ="1" Grid.Column="2" x:Name="FrameTextBox"
PreviewTextInput="NumberValidationTextBox" TextChanged="FrameTextBox_TextChanged"
Text="20" Width="50" Margin="-80,20,0,0"/>
</Grid> <!-- End Frame grid -->
</Grid> <!-- End Image info grid -->
</Grid>
<!-- End Frame grid -->
</Grid>
<!-- End Image info grid -->

<!-- Y plane image grid -->
<!-- Z(A) plane image grid -->
<Grid Grid.Column="1" Margin="5,5,5,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- title -->
<RowDefinition Height="Auto"/> <!-- horizontal slider -->
<RowDefinition Height="Auto"/> <!-- image -->
<RowDefinition Height="Auto"/>
<!-- title -->
<RowDefinition Height="Auto"/>
<!-- horizontal slider -->
<RowDefinition Height="Auto"/>
<!-- image -->
</Grid.RowDefinitions>
<Label Grid.Row="0" HorizontalAlignment="Left" Content="Y plane" Style="{StaticResource specTextStyle}" />
<!-- Y plane Vertical slider and image grid -->

<Label Grid.Row="0" HorizontalAlignment="Left" Content="Acquisition (A)" Style="{StaticResource specTextStyle}" />

<!-- Z(A) plane Vertical slider and image grid -->
<Grid Grid.Row="2" Margin="5,5,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- Image -->
<Grid Grid.Column="1" x:Name="yplane"/>
<Grid Grid.Column="1" x:Name="zplane"/>
<!-- Virtical Slider -->
<Slider Grid.Column="0" x:Name="zSlider2"
ValueChanged="zSlider_ValueChanged"
<Slider Grid.Column="0" x:Name="ySlider2"
ValueChanged="ySlider_ValueChanged"
Orientation="Vertical"
Margin="0,0,-5.8,0" Style="{StaticResource blueSlider}">
<Slider.LayoutTransform> <!-- Slider style. Additional style in App.xaml -->
<Slider.LayoutTransform>
<!-- Slider style. Additional style in App.xaml -->
<ScaleTransform CenterX="0" CenterY="0" ScaleX="0.7" ScaleY="0.4"/>
</Slider.LayoutTransform>
</Slider>
Expand All @@ -163,23 +174,28 @@
ValueChanged="xSlider_ValueChanged"
Margin="20,0,0,-10"
HorizontalAlignment="Left" Style="{StaticResource yellowSlider}">
<Slider.LayoutTransform> <!-- Slider style. Additional style in App.xaml -->
<Slider.LayoutTransform>
<!-- Slider style. Additional style in App.xaml -->
<ScaleTransform CenterX="0" CenterY="0" ScaleX="0.4" ScaleY="0.7"/>
</Slider.LayoutTransform>
</Slider>
</Grid> <!-- end Y plane image grid -->
</Grid>
<!-- end Y plane image grid -->

<!-- X plane image grid -->
<!-- X(B) plane image grid -->
<Grid Grid.Column="2" Margin="5,5,5,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- title -->
<RowDefinition Height="Auto"/> <!-- horizontal slider -->
<RowDefinition Height="Auto"/> <!-- image -->
<RowDefinition Height="Auto"/>
<!-- title -->
<RowDefinition Height="Auto"/>
<!-- horizontal slider -->
<RowDefinition Height="Auto"/>
<!-- image -->
</Grid.RowDefinitions>

<Label Grid.Row="0" HorizontalAlignment="Left" Content="X plane" Style="{StaticResource specTextStyle}" />
<Label Grid.Row="0" HorizontalAlignment="Left" Content="Elevation (B)" Style="{StaticResource specTextStyle}" />

<!-- x plane Vertical slider and image grid -->
<!-- X plane Vertical slider and image grid -->
<Grid Grid.Row="2" Margin="5,5,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
Expand All @@ -188,49 +204,56 @@
<!-- Image -->
<Grid Grid.Column="1" x:Name="xplane" />
<!-- Vertical Slider-->
<Slider Grid.Column="0" x:Name="zSlider"
ValueChanged="zSlider_ValueChanged"
<Slider Grid.Column="0" x:Name="ySlider"
ValueChanged="ySlider_ValueChanged"
Orientation="Vertical"
Margin="0,0,-5,0" Style="{StaticResource blueSlider}">
<Slider.LayoutTransform> <!-- Slider style. Additional style in App.xaml -->
<Slider.LayoutTransform>
<!-- Slider style. Additional style in App.xaml -->
<ScaleTransform CenterX="0" CenterY="0" ScaleX="0.7" ScaleY="0.4"/>
</Slider.LayoutTransform>
</Slider>
</Grid>
<!-- Horizontal Slider-->
<Slider Grid.Row="1" x:Name="ySlider"
ValueChanged="ySlider_ValueChanged"
Margin="15,0,0,-10"
<Slider Grid.Row="1" x:Name="zSlider"
ValueChanged="zSlider_ValueChanged"
Margin="20,0,0,-10"
HorizontalAlignment="Left" Style="{StaticResource redSliderH}">
<Slider.LayoutTransform> <!-- Slider style. Additional style in App.xaml -->
<Slider.LayoutTransform>
<!-- Slider style. Additional style in App.xaml -->
<ScaleTransform CenterX="0" CenterY="0" ScaleX="0.4" ScaleY="0.7"/>
</Slider.LayoutTransform>
</Slider>
</Grid> <!-- End X plane image grid-->

<!-- Z plane image grid -->
</Grid>
<!-- End X plane image grid-->

<!-- Y(C) plane image grid -->
<Grid Grid.Column="1" Grid.Row="1" Margin="5,5,5,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- title -->
<RowDefinition Height="Auto"/> <!-- horizontal slider -->
<RowDefinition Height="Auto"/> <!-- image -->
<RowDefinition Height="Auto"/>
<!-- title -->
<RowDefinition Height="Auto"/>
<!-- horizontal slider -->
<RowDefinition Height="Auto"/>
<!-- image -->
</Grid.RowDefinitions>

<Label Grid.Row="0" HorizontalAlignment="Left" Content="Z plane" Style="{StaticResource specTextStyle}" />
<Label Grid.Row="0" HorizontalAlignment="Left" Content="Coronal (C)" Style="{StaticResource specTextStyle}" />

<!-- z plane Vertical slider and image grid -->
<!-- Y plane Vertical slider and image grid -->
<Grid Grid.Row="2" Margin="5,5,5,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- Image -->
<Grid Grid.Column="1" x:Name="zplane" Margin="0,0,0,0"/>
<Grid Grid.Column="1" x:Name="yplane" Margin="0,0,0,0"/>
<!-- Vertical Slider-->
<Slider Grid.Column="0" x:Name="ySlider2"
ValueChanged="ySlider_ValueChanged"
<Slider Grid.Column="0" x:Name="zSlider2"
ValueChanged="zSlider_ValueChanged"
Orientation="Vertical" Margin="0,0,-5.8,0" Style="{StaticResource redSliderV}">
<Slider.LayoutTransform> <!-- Slider style. Additional style in App.xaml -->
<Slider.LayoutTransform>
<!-- Slider style. Additional style in App.xaml -->
<ScaleTransform CenterX="0" CenterY="0" ScaleX="0.7" ScaleY="0.4"/>
</Slider.LayoutTransform>
</Slider>
Expand All @@ -239,7 +262,8 @@
<Slider Grid.Row="1" Maximum="0" x:Name="xSlider2"
ValueChanged="xSlider_ValueChanged"
Margin="20,0,0,-10" HorizontalAlignment="Left" Style="{StaticResource yellowSlider}">
<Slider.LayoutTransform> <!-- Slider style. Additional style in App.xaml -->
<Slider.LayoutTransform>
<!-- Slider style. Additional style in App.xaml -->
<ScaleTransform CenterX="0" CenterY="0" ScaleX="0.4" ScaleY="0.7"/>
</Slider.LayoutTransform>
</Slider>
Expand Down Expand Up @@ -267,7 +291,7 @@
<Separator Opacity="0" Height="15"/>
<TextBlock Text="Enter progid for IImage3dFileLoader" />
<Separator Opacity="0" Height="5"/>
<TextBox x:Name="ProgIdTextBox" Style="{StaticResource placeHolder}" Tag="eg YourDll.Image3dFileLoader" Text="{Binding progidProperty, UpdateSourceTrigger=PropertyChanged}" />
<TextBox x:Name="ProgIdTextBox" Style="{StaticResource placeHolder}" Tag="eg YourDll.Image3dFileLoader"/>

<Separator Opacity="0" Height="15"/>
<Button x:Name="LoadImageButton" Content="Load Files" Click="LoadImageButton_Click" Width="80"/>
Expand All @@ -280,5 +304,6 @@
</StackPanel>
</Grid>

</Grid> <!-- end of main grid-->
</Grid>
<!-- end of main grid-->
</Window>
Loading

0 comments on commit 03e9fc9

Please sign in to comment.