代码拉取完成,页面将自动刷新
<Window
x:Class="FieldTools.MediaFindOut.ImgShowWindow"
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:local="clr-namespace:FieldTools.MediaFindOut"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:gif="https://github.com/XamlAnimatedGif/XamlAnimatedGif"
Title="图片展示器"
Width="800"
Height="450" WindowStartupLocation="CenterScreen"
d:DataContext="{d:DesignInstance Type=local:ImgShowWindow}"
KeyDown="Window_KeyDown"
Style="{DynamicResource CustomWindowChrome}"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50" />
<ColumnDefinition />
<ColumnDefinition Width="50" />
</Grid.ColumnDefinitions>
<Image x:Name="img" AllowDrop="True" Grid.ColumnSpan="3" gif:AnimationBehavior.SourceUri="{Binding PicUrl}" Drop="Img_Drop" MouseWheel="Image_MouseWheel" PreviewMouseMove="Img_PreviewMouseMove">
<Image.ContextMenu>
<ContextMenu>
<MenuItem Header="另存为" Click="MenuItem_SaveAs_Click"/>
<MenuItem Header="还原" Click="MenuItem_Restore_Click"/>
</ContextMenu>
</Image.ContextMenu>
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="{Binding ScaleX}" ScaleY="{Binding ScaleY}"/>
<TranslateTransform X="{Binding TranslateX}" Y="{Binding TranslateY}"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="5" Grid.ColumnSpan="3">
<Label Content="地址:"/>
<TextBlock Text="{Binding PicUrl}" VerticalAlignment="Center" MinWidth="60">
<TextBlock.ContextMenu>
<ContextMenu>
<MenuItem Header="复制地址" Click="MenuItem_CopyFilePath_Click"/>
</ContextMenu>
</TextBlock.ContextMenu>
</TextBlock>
</StackPanel>
<!--<TextBlock Grid.ColumnSpan="3" Background="AliceBlue" />-->
<WrapPanel
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Bottom">
<TextBlock Text="{Binding PicIndex}" />
<TextBlock Text="/" />
<TextBlock Text="{Binding PicUrls.Count}" />
</WrapPanel>
<Button
Background="Transparent"
Click="Button_Click_Left" BorderThickness="0"
Content="◀️" />
<Button
Grid.Column="2"
Background="Transparent" BorderThickness="0"
Click="Button_Click_Right"
Content="▶️" />
</Grid>
</Window>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。