enhance: improved ImageViewer
This commit is contained in:
1 parent
810d81ef6a
commit
7f19117c31
4 files changed
+62
-68
No files matched your search
@@ -12620,8 +12620,6 @@
|
||||
<Style TargetType="hc:ImageViewer">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="MinWidth" Value="400" />
|
||||
<Setter Property="MinHeight" Value="250" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
|
||||
<Setter Property="Template">
|
||||
@@ -12651,23 +12649,23 @@
|
||||
</Border>
|
||||
</Canvas>
|
||||
</Border>
|
||||
<Border UseLayoutRounding="True" Name="PART_BorderBottom" Opacity="0" CornerRadius="4,4,0,0" Grid.Row="1" HorizontalAlignment="Center" Background="{DynamicResource DarkOpacityBrush}">
|
||||
<Border UseLayoutRounding="True" Name="PART_BorderBottom" Visibility="{TemplateBinding ShowToolBar, Converter={StaticResource Boolean2VisibilityConverter}}" Opacity="0" CornerRadius="4,4,0,0" Grid.Row="1" HorizontalAlignment="Center" Background="{DynamicResource DarkOpacityBrush}">
|
||||
<StackPanel Margin="30,10" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Button Command="interactivity:ControlCommands.Save" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Open" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Save" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Open" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3" />
|
||||
<Border Margin="10,2" Background="White" Style="{StaticResource BorderVerticallySplitter}" />
|
||||
<Button Command="interactivity:ControlCommands.Reduce" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Reduce" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3" />
|
||||
<TextBlock Margin="6,0" Text="{TemplateBinding ScaleStr}" Style="{StaticResource TextBlockSubTitle}" Foreground="{DynamicResource TextIconBrush}" />
|
||||
<Button Command="interactivity:ControlCommands.Enlarge" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Restore" Background="Transparent" Margin="6,0" Style="{StaticResource ButtonCustom}" Foreground="White">
|
||||
<Button Command="interactivity:ControlCommands.Enlarge" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Restore" Background="Transparent" Margin="6,0" Style="{StaticResource ButtonCustom}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Border BorderThickness="1" BorderBrush="White" Padding="2">
|
||||
<TextBlock Text="1:1" />
|
||||
</Border>
|
||||
</Button>
|
||||
<Border Margin="10,2" Background="White" Style="{StaticResource BorderVerticallySplitter}" />
|
||||
<Button Command="interactivity:ControlCommands.RotateLeft" CommandParameter="" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.RotateRight" Margin="6,0,0,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}" Padding="3" />
|
||||
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton,Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.RotateLeft" CommandParameter="" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.RotateRight" Margin="6,0,0,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}" Padding="3" />
|
||||
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton, Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -229,6 +229,9 @@ namespace HandyControl.Controls
|
||||
ctl.Init();
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty ShowToolBarProperty = DependencyProperty.Register(
|
||||
"ShowToolBar", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.TrueBox));
|
||||
|
||||
public static readonly DependencyProperty IsFullScreenProperty = DependencyProperty.Register(
|
||||
"IsFullScreen", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
@@ -292,6 +295,12 @@ namespace HandyControl.Controls
|
||||
set => SetValue(ImageSourceProperty, value);
|
||||
}
|
||||
|
||||
public bool ShowToolBar
|
||||
{
|
||||
get => (bool) GetValue(ShowToolBarProperty);
|
||||
set => SetValue(ShowToolBarProperty, ValueBoxes.BooleanBox(value));
|
||||
}
|
||||
|
||||
internal object ImageContent
|
||||
{
|
||||
get => GetValue(ImageContentProperty);
|
||||
@@ -406,7 +415,6 @@ namespace HandyControl.Controls
|
||||
_canvasSmallImg.MouseLeftButtonDown -= CanvasSmallImg_OnMouseLeftButtonDown;
|
||||
_canvasSmallImg.MouseLeftButtonUp -= CanvasSmallImg_OnMouseLeftButtonUp;
|
||||
_canvasSmallImg.MouseMove -= CanvasSmallImg_OnMouseMove;
|
||||
_canvasSmallImg.MouseLeave -= CanvasSmallImg_OnMouseLeave;
|
||||
}
|
||||
|
||||
base.OnApplyTemplate();
|
||||
@@ -430,7 +438,6 @@ namespace HandyControl.Controls
|
||||
_canvasSmallImg.MouseLeftButtonDown += CanvasSmallImg_OnMouseLeftButtonDown;
|
||||
_canvasSmallImg.MouseLeftButtonUp += CanvasSmallImg_OnMouseLeftButtonUp;
|
||||
_canvasSmallImg.MouseMove += CanvasSmallImg_OnMouseMove;
|
||||
_canvasSmallImg.MouseLeave += CanvasSmallImg_OnMouseLeave;
|
||||
}
|
||||
|
||||
_borderSmallIsLoaded = false;
|
||||
@@ -595,24 +602,11 @@ namespace HandyControl.Controls
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
MoveImg();
|
||||
}
|
||||
protected override void OnMouseMove(MouseEventArgs e) => MoveImg();
|
||||
|
||||
protected override void OnMouseLeave(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseLeave(e);
|
||||
_imgIsMouseLeftButtonDown = false;
|
||||
ShowBorderBottom = false;
|
||||
}
|
||||
protected override void OnMouseLeave(MouseEventArgs e) => ShowBorderBottom = false;
|
||||
|
||||
protected override void OnMouseWheel(MouseWheelEventArgs e)
|
||||
{
|
||||
base.OnMouseWheel(e);
|
||||
ScaleImg(e.Delta > 0);
|
||||
}
|
||||
protected override void OnMouseWheel(MouseWheelEventArgs e) => ScaleImg(e.Delta > 0);
|
||||
|
||||
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
|
||||
{
|
||||
@@ -658,11 +652,7 @@ namespace HandyControl.Controls
|
||||
_imgIsMouseLeftButtonDown = true;
|
||||
}
|
||||
|
||||
protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArgs e)
|
||||
{
|
||||
base.OnPreviewMouseLeftButtonUp(e);
|
||||
_imgIsMouseLeftButtonDown = false;
|
||||
}
|
||||
protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArgs e) => _imgIsMouseLeftButtonDown = false;
|
||||
|
||||
/// <summary>
|
||||
/// 右下角小图片显示切换
|
||||
@@ -837,6 +827,11 @@ namespace HandyControl.Controls
|
||||
ShowCloseButton = _imgCurrentPoint.Y < 200;
|
||||
ShowBorderBottom = _imgCurrentPoint.Y > ActualHeight - 200;
|
||||
|
||||
if (Mouse.LeftButton == MouseButtonState.Released)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_imgIsMouseLeftButtonDown)
|
||||
{
|
||||
var subX = _imgCurrentPoint.X - _imgMouseDownPoint.X;
|
||||
@@ -874,18 +869,25 @@ namespace HandyControl.Controls
|
||||
/// </summary>
|
||||
private void MoveSmallImg()
|
||||
{
|
||||
if (_imgSmallIsMouseLeftButtonDown)
|
||||
if (!_imgSmallIsMouseLeftButtonDown)
|
||||
{
|
||||
_imgSmallCurrentPoint = Mouse.GetPosition(_canvasSmallImg);
|
||||
|
||||
var subX = _imgSmallCurrentPoint.X - _imgSmallMouseDownPoint.X;
|
||||
var subY = _imgSmallCurrentPoint.Y - _imgSmallMouseDownPoint.Y;
|
||||
|
||||
var marginX = _imgSmallMouseDownMargin.Left + subX;
|
||||
var marginY = _imgSmallMouseDownMargin.Top + subY;
|
||||
|
||||
MoveSmallImg(marginX, marginY);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Mouse.LeftButton == MouseButtonState.Released)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_imgSmallCurrentPoint = Mouse.GetPosition(_canvasSmallImg);
|
||||
|
||||
var subX = _imgSmallCurrentPoint.X - _imgSmallMouseDownPoint.X;
|
||||
var subY = _imgSmallCurrentPoint.Y - _imgSmallMouseDownPoint.Y;
|
||||
|
||||
var marginX = _imgSmallMouseDownMargin.Left + subX;
|
||||
var marginY = _imgSmallMouseDownMargin.Top + subY;
|
||||
|
||||
MoveSmallImg(marginX, marginY);
|
||||
}
|
||||
|
||||
private void MoveSmallImg(double marginX, double marginY)
|
||||
@@ -921,7 +923,5 @@ namespace HandyControl.Controls
|
||||
private void CanvasSmallImg_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e) => _imgSmallIsMouseLeftButtonDown = false;
|
||||
|
||||
private void CanvasSmallImg_OnMouseMove(object sender, MouseEventArgs e) => MoveSmallImg();
|
||||
|
||||
private void CanvasSmallImg_OnMouseLeave(object sender, MouseEventArgs e) => _imgSmallIsMouseLeftButtonDown = false;
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,6 @@
|
||||
<Style TargetType="hc:ImageViewer">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="MinWidth" Value="400"/>
|
||||
<Setter Property="MinHeight" Value="250"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="Template">
|
||||
@@ -37,25 +35,25 @@
|
||||
</Border>
|
||||
</Canvas>
|
||||
</Border>
|
||||
<Border UseLayoutRounding="True" Name="PART_BorderBottom" Opacity="0" CornerRadius="4,4,0,0" Grid.Row="1" HorizontalAlignment="Center" Background="{DynamicResource DarkOpacityBrush}">
|
||||
<Border UseLayoutRounding="True" Name="PART_BorderBottom" Visibility="{TemplateBinding ShowToolBar, Converter={StaticResource Boolean2VisibilityConverter}}" Opacity="0" CornerRadius="4,4,0,0" Grid.Row="1" HorizontalAlignment="Center" Background="{DynamicResource DarkOpacityBrush}">
|
||||
<StackPanel Margin="30,10" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Button Command="interactivity:ControlCommands.Save" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.Open" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.Save" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.Open" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3"/>
|
||||
|
||||
<Border Margin="10,2" Background="White" Style="{StaticResource BorderVerticallySplitter}"/>
|
||||
|
||||
<Button Command="interactivity:ControlCommands.Reduce" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.Reduce" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3"/>
|
||||
<TextBlock Margin="6,0" Text="{TemplateBinding ScaleStr}" Style="{StaticResource TextBlockSubTitle}" Foreground="{DynamicResource TextIconBrush}"/>
|
||||
<Button Command="interactivity:ControlCommands.Enlarge" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.Restore" Background="Transparent" Margin="6,0" Style="{StaticResource ButtonCustom}" Foreground="White">
|
||||
<Button Command="interactivity:ControlCommands.Enlarge" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.Restore" Background="Transparent" Margin="6,0" Style="{StaticResource ButtonCustom}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Border BorderThickness="1" BorderBrush="White" Padding="2">
|
||||
<TextBlock Text="1:1"/>
|
||||
</Border>
|
||||
</Button>
|
||||
<Border Margin="10,2" Background="White" Style="{StaticResource BorderVerticallySplitter}"/>
|
||||
<Button Command="interactivity:ControlCommands.RotateLeft" CommandParameter="" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.RotateRight" Margin="6,0,0,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}" Padding="3"/>
|
||||
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton,Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.RotateLeft" CommandParameter="" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3"/>
|
||||
<Button Command="interactivity:ControlCommands.RotateRight" Margin="6,0,0,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}" Padding="3"/>
|
||||
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton, Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3"/>
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
@@ -12762,8 +12762,6 @@
|
||||
<Style TargetType="hc:ImageViewer">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="MinWidth" Value="400" />
|
||||
<Setter Property="MinHeight" Value="250" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}" />
|
||||
<Setter Property="Template">
|
||||
@@ -12793,23 +12791,23 @@
|
||||
</Border>
|
||||
</Canvas>
|
||||
</Border>
|
||||
<Border UseLayoutRounding="True" Name="PART_BorderBottom" Opacity="0" CornerRadius="4,4,0,0" Grid.Row="1" HorizontalAlignment="Center" Background="{DynamicResource DarkOpacityBrush}">
|
||||
<Border UseLayoutRounding="True" Name="PART_BorderBottom" Visibility="{TemplateBinding ShowToolBar, Converter={StaticResource Boolean2VisibilityConverter}}" Opacity="0" CornerRadius="4,4,0,0" Grid.Row="1" HorizontalAlignment="Center" Background="{DynamicResource DarkOpacityBrush}">
|
||||
<StackPanel Margin="30,10" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<Button Command="interactivity:ControlCommands.Save" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Open" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Save" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource SaveGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Open" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource WindowsGeometry}" Padding="3" />
|
||||
<Border Margin="10,2" Background="White" Style="{StaticResource BorderVerticallySplitter}" />
|
||||
<Button Command="interactivity:ControlCommands.Reduce" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Reduce" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource ReduceGeometry}" Padding="3" />
|
||||
<TextBlock Margin="6,0" Text="{TemplateBinding ScaleStr}" Style="{StaticResource TextBlockSubTitle}" Foreground="{DynamicResource TextIconBrush}" />
|
||||
<Button Command="interactivity:ControlCommands.Enlarge" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Restore" Background="Transparent" Margin="6,0" Style="{StaticResource ButtonCustom}" Foreground="White">
|
||||
<Button Command="interactivity:ControlCommands.Enlarge" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource EnlargeGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.Restore" Background="Transparent" Margin="6,0" Style="{StaticResource ButtonCustom}" Foreground="{DynamicResource TextIconBrush}">
|
||||
<Border BorderThickness="1" BorderBrush="White" Padding="2">
|
||||
<TextBlock Text="1:1" />
|
||||
</Border>
|
||||
</Button>
|
||||
<Border Margin="10,2" Background="White" Style="{StaticResource BorderVerticallySplitter}" />
|
||||
<Button Command="interactivity:ControlCommands.RotateLeft" CommandParameter="" Margin="6,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.RotateRight" Margin="6,0,0,0" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}" Padding="3" />
|
||||
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton,Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.RotateLeft" CommandParameter="" Margin="6,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}" Padding="3" />
|
||||
<Button Command="interactivity:ControlCommands.RotateRight" Margin="6,0,0,0" Foreground="{DynamicResource TextIconBrush}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}" Padding="3" />
|
||||
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton, Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" hc:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
Reference in new issue
Block a user