/
n1kolas
/
AdamusCleanCode
Обзор
Документация
Войти
/
n1kolas
/
AdamusCleanCode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
codeCleanup
WpfApp2/MainWindow.xaml
92 строки
4 KB
Kharchenko Nikolai
Added ColumnDefinitions
14 окт 2025, 11:18
14 окт 2025, 11:18
80cf1e4
Код
Авторство
О чём код?
<Window x:Class="WpfApp2.MainWindow" 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfApp2" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Window.Resources> <Style TargetType="TextBox"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TextBox"> <Border CornerRadius="20" Background="White" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <!-- PART_ContentHost обязан быть внутри корневого элемента --> <ScrollViewer x:Name="PART_ContentHost"/> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="Button"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border CornerRadius="20" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True"/> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> </Window.Resources> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Border Background="Red" BorderThickness="2" CornerRadius="20" BorderBrush="Black"/> <TextBlock FontSize="30" Height="46" VerticalAlignment="Top" TextAlignment="Center" x:Name="SystemText" >Войти в систему </TextBlock> <Border Background="Orange" BorderBrush="Black" BorderThickness="2" CornerRadius="30" Height="244" Width="396" HorizontalAlignment="Left" VerticalAlignment="Top"/> <TextBlock HorizontalAlignment="Left" FontSize="15" TextWrapping="Wrap" VerticalAlignment="Top"> <Run Language="ru-ru" Text="Имя пользователя:"/></TextBlock> <TextBlock HorizontalAlignment="Left" FontSize="15" Text="Пароль:" TextWrapping="Wrap" VerticalAlignment="Top" RenderTransformOrigin="0.474,1.831"/> <TextBox HorizontalAlignment="Left" Name="name" TextAlignment="Center" Width="154" Height="50" VerticalContentAlignment="Center"/> <TextBox HorizontalAlignment="Left" Name ="password" VerticalAlignment="Top" Width="154" Height="50"/> <Button Content="Войти" Click="EnterToSystem" HorizontalAlignment="Left" VerticalAlignment="Top" Width="126" Height="32" Background="Black" FontFamily="Bahnschrift" BorderBrush="{x:Null}" Foreground="{DynamicResource {x:Static SystemColors.ActiveCaptionBrushKey}}" FontSize="16"/> <TextBlock VerticalAlignment="Top" HorizontalAlignment="Left" Text ="Hello world"></TextBlock> </Grid> </Window>