LunarPresentation/Dialogs/RichTextEditor.xaml

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<Window x:Class="SHomeWorkshop.LunarPresentation.Dialogs.RichTextEditor"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Icon="/LunarPresentation;component/Resources/Icons/Taiji.ico"
        WindowStartupLocation="Manual" SnapsToDevicePixels="True"
        Title="Lunar Presentation——富文本块编辑器" Height="150" Background="Transparent"
        MinHeight="110" MinWidth="240" WindowStyle="None" AllowsTransparency="True"
        RenderOptions.BitmapScalingMode="NearestNeighbor" PreviewKeyDown="Window_PreviewKeyDown"
        TextOptions.TextFormattingMode="Display" FontFamily="SimSun" >
   
    <Border Name="outBorder" Background="Black" BorderThickness="2" Padding="4,4,4,2" BorderBrush="GreenYellow">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="28"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition />
                <ColumnDefinition Width="50"/>
                <ColumnDefinition Width="40"/>
            </Grid.ColumnDefinitions>

            <RichTextBox Name="mainRTB" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
                         SelectionChanged="mainRTB_SelectionChanged" AcceptsReturn="True"
                         KeyUp="mainRTB_KeyUp" PreviewKeyDown="mainRTB_PreviewKeyDown">
                <RichTextBox.ToolTip>
                    <TextBlock>
                        直接支持多行文本,
                        <LineBreak />
                        完成编辑:Ctrl+Enter
                        <LineBreak />
                        取消编辑:Esc
                    </TextBlock>
                </RichTextBox.ToolTip>
                <FlowDocument Name="mainDoc" LineHeight="5"/>
            </RichTextBox>
            <ToolBar Grid.Row="1">
                <ToolBar.Resources>
                    <Style TargetType="Button">
                        <Setter Property="Button.Width" Value="22"/>
                        <Setter Property="Button.Height" Value="22"/>
                        <Setter Property="Button.Background" Value="White"/>
                        <Setter Property="Button.Foreground" Value="Orange"/>
                        <Setter Property="Button.Focusable" Value="false"/>
                    </Style>
                </ToolBar.Resources>

                <Button Name="btnCut" Click="btnCut_Click" ToolTip="Ctrl+X">
                    <Image Height="16" Width="16" Source="/LunarPresentation;component/Resources/Icons/CutHS.png" />
                </Button>
                
                <Button Name="btnCopy" Click="btnCopy_Click" ToolTip="Ctrl+C">
                    <Image Height="16" Width="16" Source="/LunarPresentation;component/Resources/Icons/CopyHS.png" />
                </Button>
                
                <Button Name="btnPaste" Click="btnPaste_Click" ToolTip="Ctrl+V">
                    <Image Height="16" Width="16" Source="/LunarPresentation;component/Resources/Icons/PasteHS.png" />
                </Button>
                
后面还有 79 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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