LunarMind/Dialogs/CopySelectedAreaAsImageWindow.xaml

(完整代码) 1KB

<Window x:Class="SHomeWorkshop.LunarMind.Dialogs.CopySelectedAreaAsImageWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        TextOptions.TextFormattingMode="Display" ResizeMode="CanResizeWithGrip"
        Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
        Title="截图" Width="440" Height="330" WindowStartupLocation="CenterOwner"
        Icon="/LunarMind;component/Resources/LunarMind_Min.ico">
    <!--Icon="/LunarMind;component/Resources/LunarMind.ico"-->
    <!--XP下用这个图标会抛出异常-->
    
    <Window.Resources>
        <ImageBrush x:Key="WindowBackgroundImageBrush" ImageSource="/LunarMind;component/Resources/BackColor.png"
                    AlignmentX="Left" AlignmentY="Top" Stretch="Fill" TileMode="Tile"
                    ViewportUnits="Absolute" ViewboxUnits="RelativeToBoundingBox" Viewbox="0,0,1,1" Viewport="0,0,4,4" />
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>

        <ScrollViewer Name="MainScrollViewer" Background="{StaticResource ResourceKey=WindowBackgroundImageBrush}">

            <!--布局将决定RanderTargetBitmap的Rander方法是否能取出正确的区域,HorizontalAlignment="Center" VerticalAlignment="Center"不能少。-->
            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" >
                <Canvas Name="MainCanvas"  Background="White" ClipToBounds="False">
                    <Rectangle Name="MainRect"/>
                </Canvas>
            </StackPanel>
        </ScrollViewer>

        <Button Name="BtnCopyAsImage" Grid.Row="1" Padding="20,4" HorizontalAlignment="Right" Margin="20,2" Click="BtnCopyAsImage_Click">复制(_C)</Button>
    </Grid>
</Window>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。