Files
Lattice/Lattice.IDE/Controls/EditorView.xaml
2026-01-18 16:33:35 +03:00

58 lines
2.4 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<UserControl
x:Class="Lattice.IDE.Controls.EditorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Lattice.IDE.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource Lattice.Brush.Background.Secondary}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<!-- Полоса номеров строк -->
<ColumnDefinition Width="*"/>
<!-- Текст кода -->
</Grid.ColumnDefinitions>
<!-- Левая панель с номерами строк -->
<StackPanel Grid.Column="0" Background="{ThemeResource Lattice.Brush.Background.Primary}" Padding="10,5">
<TextBlock Text="1" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
<TextBlock Text="2" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
<TextBlock Text="3" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
<TextBlock Text="4" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
<TextBlock Text="5" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
<TextBlock Text="6" Foreground="Gray" FontFamily="Cascadia Code, Consolas"/>
</StackPanel>
<!-- Основная область редактирования -->
<TextBox Grid.Column="1"
AcceptsReturn="True"
IsSpellCheckEnabled="False"
TextWrapping="NoWrap"
FontFamily="Cascadia Code, Consolas"
FontSize="14"
BorderThickness="0"
Padding="10"
Background="Transparent"
Foreground="{ThemeResource TextFillColorPrimaryBrush}"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
xml:space="preserve">
<TextBox.Text>using System;
using Lattice.Core;
namespace Lattice.IDE.Demo;
public class Program
{
public void Main()
{
Console.WriteLine("Hello, Lattice 2026!");
}
}
</TextBox.Text>
</TextBox>
</Grid>
</UserControl>