finish auto-hide

This commit is contained in:
Paddy Xu
2017-08-06 21:01:02 +03:00
parent 5b97e7ef60
commit 56cb31fd2a
16 changed files with 241 additions and 71 deletions

View File

@@ -9,7 +9,7 @@
x:Name="imagePanel"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Rectangle>
<Rectangle Visibility="{Binding BackgroundVisibility, ElementName=imagePanel}">
<Rectangle.Fill>
<ImageBrush x:Name="backgroundBrush" ImageSource="Resources/background.png" AlignmentY="Top" Viewport="0,0,32,32"
ViewportUnits="Absolute" Stretch="UniformToFill" TileMode="Tile" />

View File

@@ -45,6 +45,7 @@ namespace QuickLook.Plugin.ImageViewer
private BitmapScalingMode _renderMode = BitmapScalingMode.HighQuality;
private BitmapSource _source;
private double _zoomFactor = 1d;
private Visibility _backgroundVisibility = Visibility.Visible;
private bool _zoomToFit = true;
@@ -88,6 +89,16 @@ namespace QuickLook.Plugin.ImageViewer
}
}
public Visibility BackgroundVisibility
{
get => _backgroundVisibility;
set
{
_backgroundVisibility = value;
OnPropertyChanged();
}
}
public double MinZoomFactor
{
get => _minZoomFactor;

View File

@@ -64,8 +64,7 @@ namespace QuickLook.Plugin.ImageViewer
context.PreferredSize = new Size(1024, 768);
Directory.SetCurrentDirectory(App.AppPath);
context.AutoHideTitlebar = true;
context.TitlebarOverlap = true;
}