Jelajahi Sumber

Я создал форму

Kirill Baibarak 4 tahun lalu
induk
melakukan
8a4f3e44aa

+ 7 - 0
Kovalev1App/Kovalev1App.csproj

@@ -55,6 +55,9 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
+    <Compile Include="Window1.xaml.cs">
+      <DependentUpon>Window1.xaml</DependentUpon>
+    </Compile>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -67,6 +70,10 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Page Include="Window1.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs">

+ 8 - 23
Kovalev1App/MainWindow.xaml

@@ -5,30 +5,15 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:Kovalev1App"
         mc:Ignorable="d"
-        Title="MainWindow" Height="450" Width="1064.534">
-    <Grid Margin="-2,10,2,-10">
+        Title="MainWindow" Height="450" Width="800">
+    <Grid Margin="-2,0,0,-10" HorizontalAlignment="Left" Width="792" Height="419" VerticalAlignment="Bottom">
         <Grid.RowDefinitions>
-            <RowDefinition Height="35*"/>
-            <RowDefinition Height="235*"/>
-            <RowDefinition Height="49*"/>
+            <RowDefinition Height="42"/>
+            <RowDefinition/>
+            <RowDefinition Height="42"/>
         </Grid.RowDefinitions>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="80*"/>
-            <ColumnDefinition Width="295*"/>
-            <ColumnDefinition Width="142*"/>
-        </Grid.ColumnDefinitions>
-        <Grid Grid.ColumnSpan="3" Grid.RowSpan="3">
-            <Grid.RowDefinitions>
-                <RowDefinition Height="*"/>
-                <RowDefinition Height="235*"/>
-                <RowDefinition Height="*"/>
-            </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="*"/>
-                <ColumnDefinition Width="295*"/>
-                <ColumnDefinition Width="*"/>
-            </Grid.ColumnDefinitions>
-
-        </Grid>
+        <Rectangle Fill="#FFF4F4F5" Grid.Row="2" StrokeThickness="0" Height="42" VerticalAlignment="Bottom"/>
+        <Button Content="Назад" HorizontalAlignment="Left" Margin="10,10,0,10" Width="75"/>
+        <Frame x:Name="MainFrame" Content="Frame" Grid.Row="1"/>
     </Grid>
 </Window>

+ 12 - 0
Kovalev1App/Window1.xaml

@@ -0,0 +1,12 @@
+<Window x:Class="Kovalev1App.Window1"
+        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:Kovalev1App"
+        mc:Ignorable="d"
+        Title="Window1" Height="450" Width="800">
+    <Grid>
+        
+    </Grid>
+</Window>

+ 27 - 0
Kovalev1App/Window1.xaml.cs

@@ -0,0 +1,27 @@
+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.Shapes;
+
+namespace Kovalev1App
+{
+    /// <summary>
+    /// Логика взаимодействия для Window1.xaml
+    /// </summary>
+    public partial class Window1 : Window
+    {
+        public Window1()
+        {
+            InitializeComponent();
+        }
+    }
+}