-
Notifications
You must be signed in to change notification settings - Fork 4
/
ViewWindow.xaml.notworking
98 lines (81 loc) · 4.48 KB
/
ViewWindow.xaml.notworking
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<Window x:Class="ZipImageViewer.ViewWindow" x:Name="ViewWin"
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:ZipImageViewer" mc:Ignorable="d"
Title="ViewWindow" Height="600" Width="800" WindowState="Maximized"
MouseUp="ViewWin_MouseUp" Loaded="ViewWindow_Loaded"
Opacity="0" SnapsToDevicePixels="True" UseLayoutRounding="True">
<Window.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard Storyboard="{StaticResource SB_FadeIn}"/>
</EventTrigger>
</Window.Triggers>
<Window.Resources>
<local:CenterConterter x:Key="CenterConterter"/>
</Window.Resources>
<!--<Grid>
<ScrollViewer x:Name="SV" Background="#FF464646"
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
PreviewMouseLeftButtonDown="SV_PreviewMouseLeftButtonDown"
PreviewMouseLeftButtonUp="SV_PreviewMouseLeftButtonUp"
PreviewMouseMove="SV_PreviewMouseMove"
PreviewMouseDoubleClick="SV_PreviewMouseDoubleClick"
PreviewMouseWheel="SV_PreviewMouseWheel">
<local:DpiImage x:Name="IM" RenderOptions.BitmapScalingMode="HighQuality"
VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="None"
Source="{Binding ElementName=ViewWin, Path=ImageInfo.ImageSource, Mode=OneWay}">
<local:DpiImage.CacheMode>
<BitmapCache/>
</local:DpiImage.CacheMode>
--><!--<local:DpiImage.Effect>
<DropShadowEffect Direction="270" BlurRadius="30" ShadowDepth="15" Color="#FF4C4C4C"/>
</local:DpiImage.Effect>-->
<!--<local:DpiImage.LayoutTransform>
<ScaleTransform/>
</local:DpiImage.LayoutTransform>--><!--
</local:DpiImage>
--><!--<Image x:Name="IM" RenderOptions.BitmapScalingMode="HighQuality"
Source="{Binding ElementName=ViewWin, Path=ImageInfo.ImageSource, Mode=OneWay}">
<Image.CacheMode>
<BitmapCache/>
</Image.CacheMode>
<Image.Effect>
<DropShadowEffect Direction="270" BlurRadius="30" ShadowDepth="15" Color="#FF4C4C4C"/>
</Image.Effect>
</Image>--><!--
</ScrollViewer>
<TextBlock Text="{Binding ElementName=ViewWin, Path=ImageInfo.FileName, Mode=OneWay}"
HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="4" Foreground="Gray"/>
</Grid>-->
<Grid x:Name="GR">
<Canvas x:Name="CA"
PreviewMouseLeftButtonDown="CA_PreviewMouseLeftButtonDown"
PreviewMouseWheel="CA_PreviewMouseWheel"
PreviewMouseMove="CA_PreviewMouseMove"
PreviewMouseLeftButtonUp="CA_PreviewMouseLeftButtonUp">
<local:DpiImage x:Name="IM" RenderOptions.BitmapScalingMode="HighQuality" Stretch="None"
Source="{Binding ElementName=ViewWin, Path=ImageInfo.ImageSource, Mode=OneWay}">
<Canvas.Left>
<MultiBinding Converter="{StaticResource CenterConterter}">
<Binding ElementName="CA" Path="ActualWidth" />
<Binding ElementName="IM" Path="ActualWidth" />
</MultiBinding>
</Canvas.Left>
<Canvas.Top>
<MultiBinding Converter="{StaticResource CenterConterter}">
<Binding ElementName="CA" Path="ActualHeight" />
<Binding ElementName="IM" Path="ActualHeight" />
</MultiBinding>
</Canvas.Top>
<local:DpiImage.RenderTransform>
<MatrixTransform x:Name="IM_RT"/>
<!-- <TranslateTransform x:Name="IM_TT"/> -->
</local:DpiImage.RenderTransform>
</local:DpiImage>
</Canvas>
<local:BubbleMessage x:Name="BM"/>
</Grid>
</Window>