LunarMind/Dialogs/ImagePresentationWindow.xaml
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<Window x:Class="SHomeWorkshop.LunarMind.ImagePresentationWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cp="clr-namespace:SHomeWorkshop.LunarMind"
Title="Lunar Mind [Esc或F6 关闭]" Height="400" Width="600"
WindowStartupLocation="CenterScreen" Background="#293955"
WindowState="Maximized" WindowStyle="SingleBorderWindow" KeyDown="Window_KeyDown"
TextOptions.TextFormattingMode="Ideal"
Icon="/LunarMind;component/Resources/LunarMind_Min.ico">
<!--Icon="/LunarMind;component/Resources/LunarMind.ico"-->
<!--XP下用这个图标会抛出异常-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock Name="tbTitleText" Grid.Row="0" Foreground="White" Background="#293955" Padding="10,4,10,10" FontSize="48" Visibility="Collapsed" HorizontalAlignment="Stretch" TextAlignment="Center"/>
<!--这是个背景矩形-->
<Rectangle Name="backgroundRect" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
<Border Name="baseBorder" Grid.Row="1">
<Viewbox Name="baseViewBox">
<Image Name="mainImage">
<Image.LayoutTransform>
<!--居中对齐是没有用处的。-->
<ScaleTransform x:Name="scaleTransForm"
ScaleX="{Binding ElementName=sliderOfCanvasScale,Path=Value,Mode=OneWay,
Converter={x:Static Member=cp:MainWindow.scaleValueConverter}}"
ScaleY="{Binding ElementName=sliderOfCanvasScale,Path=Value,Mode=OneWay,
Converter={x:Static Member=cp:MainWindow.scaleValueConverter}}"/>
</Image.LayoutTransform>
</Image>
</Viewbox>
</Border>
<DockPanel Grid.Row="2" Margin="10,0">
<TextBlock DockPanel.Dock="Left" VerticalAlignment="Center" Foreground="White"
Visibility="Collapsed">+,放大 -,缩小 0,还原</TextBlock>
<Slider Name="sliderOfCanvasScale" DockPanel.Dock="Right" Width="120" Minimum="-9" Value="0" Maximum="9"
TickPlacement="None" TickFrequency="1" VerticalAlignment="Center"
Visibility="Collapsed"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="10,10"/>
<Setter Property="Padding" Value="10,4"/>
</Style>
</StackPanel.Resources>
<Button Name="btnPreview" Click="btnPreview_Click" ToolTip="PageUp" Visibility="Hidden">上一张</Button>
<Button Name="btnExit" Click="btnExit_Click" ToolTip="Esc或F6" IsCancel="True">退出</Button>
<Button Name="btnNext" Click="btnNext_Click" ToolTip="PageDown" Visibility="Hidden" IsDefault="True">下一张</Button>
</StackPanel>
</DockPanel>
后面还有 3 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。