Procházet zdrojové kódy

Изменил размер окна

studio.vizual1@yandex.ru před 3 roky
rodič
revize
0c085d76ee
4 změnil soubory, kde provedl 71 přidání a 8 odebrání
  1. 6 8
      MainWindow.xaml
  2. 30 0
      Pages/AuthPage.xaml
  3. 28 0
      Pages/AuthPage.xaml.cs
  4. 7 0
      WPF.csproj

+ 6 - 8
MainWindow.xaml

@@ -8,14 +8,12 @@
         Title="MainWindow" Height="450" Width="800">
     <Grid>
         <Grid.RowDefinitions>
-            <RowDefinition Height="*"/>
-            <RowDefinition Height="235"/>
-            <RowDefinition Height="*"/>
+            <RowDefinition Height="42"/>
+            <RowDefinition/>
+            <RowDefinition Height="42"/>
         </Grid.RowDefinitions>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="*"/>
-            <ColumnDefinition Width="295"/>
-            <ColumnDefinition Width="*"/>
-        </Grid.ColumnDefinitions>
+        <Rectangle Fill="#FFF4F4F5" Grid.Row="2" StrokeThickness="0"/>
+        <Button Content="Назад" HorizontalAlignment="Left" Margin="10,10,0,10" Width="75"></Button>
+        <Frame x:Name="MainFrame" Content="Frame" Grid.Row="1"></Frame>
     </Grid>
 </Window>

+ 30 - 0
Pages/AuthPage.xaml

@@ -0,0 +1,30 @@
+<Page x:Class="WPF.Pages.AuthPage"
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:WPF.Pages"
+      mc:Ignorable="d" 
+      d:DesignHeight="300" d:DesignWidth="300"
+      Title="Авторизация">
+
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="*"/>
+            <ColumnDefinition Width="50"/>
+            <ColumnDefinition Width="170"/>
+            <ColumnDefinition Width="*"/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="*"/>
+            <RowDefinition Height="225"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <Label Content="Логин" Grid.Column="1" Grid.Row="1" VerticalAlignment="Top" Height="25"/>
+        <TextBlock Grid.Column="2" Height="25" Grid.Row="1" TextWrapping="Wrap" Text="" VerticalAlignment="Top"/>
+        <Label Content="Пароль" Grid.Column="1" Grid.Row="1" VerticalAlignment="Top" Height="25" Margin="0,30,0,0"/>
+        <PasswordBox Grid.Column="2" Margin="0,30,0,0" Grid.Row="1" VerticalAlignment="Top" Height="25"></PasswordBox>
+        <Button Content="Вход" Grid.Column="2" Margin="0,60,0,0" Grid.Row="1" VerticalAlignment="Top"></Button>
+        <Button Content="Регистрация" Grid.Column="2" Margin="0,85,0,0" Grid.Row="1" VerticalAlignment="Top"></Button>
+    </Grid>
+</Page>

+ 28 - 0
Pages/AuthPage.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace WPF.Pages
+{
+    /// <summary>
+    /// Логика взаимодействия для AuthPage.xaml
+    /// </summary>
+    public partial class AuthPage : Page
+    {
+        public AuthPage()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 7 - 0
WPF.csproj

@@ -71,8 +71,15 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Page Include="Pages\AuthPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Pages\AuthPage.xaml.cs">
+      <DependentUpon>AuthPage.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
     </Compile>