-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
55 lines (50 loc) · 3.08 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
51
52
53
54
55
<Window x:Class="RawViewer.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:RawViewer"
mc:Ignorable="d"
Title="Raw image viewer" Height="450" Width="800" AllowDrop="True" Drop="ZoomBorder_Drop" Closing="Window_Closing" Icon="Resources\main.png">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<local:ZoomBorder ClipToBounds="True">
<Image Name="_image" Source="Resources\drag.png"/>
</local:ZoomBorder>
<StackPanel Grid.Column="1" Margin="5">
<StackPanel Orientation="Horizontal">
<Label Content="Яркость:" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Path=Value, ElementName=_sliderBrightness}" Margin="10" />
</StackPanel>
<Slider Name="_sliderBrightness" Maximum="100" Minimum="-100" TickFrequency="1" LargeChange="25" Value="0" IsSnapToTickEnabled="True" Thumb.DragCompleted="OnSlider_ValueChanged"/>
<StackPanel Orientation="Horizontal">
<Label Content="Контраст:" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Path=Value, ElementName=_sliderContrast}" Margin="10" />
</StackPanel>
<Slider Name="_sliderContrast" Maximum="100" Minimum="-100" TickFrequency="1" LargeChange="25" Value="0" IsSnapToTickEnabled="True" Thumb.DragCompleted="OnSlider_ValueChanged"/>
<StackPanel Orientation="Horizontal">
<Label Content="Гамма:" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Path=Value, ElementName=_sliderGamma}" Margin="10" />
</StackPanel>
<Slider Name="_sliderGamma" Maximum="7.9" Minimum="0.1" TickFrequency="0.05" LargeChange="1.0" Value="1.0" IsSnapToTickEnabled="True" Thumb.DragCompleted="OnSlider_ValueChanged"/>
<StackPanel Orientation="Vertical">
<Label x:Name="label" Content="Тип изображения"/>
<ComboBox x:Name="comboBoxType" SelectedIndex="1" SelectionChanged="ImageType_SelectionChanged">
<ComboBoxItem Content="8bit"/>
<ComboBoxItem Content="10bit"/>
<ComboBoxItem Content="12bit"/>
<ComboBoxItem Content="14bit"/>
<ComboBoxItem Content="16bit"/>
<ComboBoxItem Content="32bit"/>
</ComboBox>
</StackPanel>
</StackPanel>
<Button Grid.Column="1" Content="Browse Image..." Click="Button_Click" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="5" Width="100" />
</Grid>
</Window>