浏览代码

Создание главного окна

y.buzueva2002 2 年之前
父节点
当前提交
edca9a3bba

+ 3 - 1
BuzuevaDemo/App.xaml

@@ -4,6 +4,8 @@
              xmlns:local="clr-namespace:BuzuevaDemo"
              StartupUri="MainWindow.xaml">
     <Application.Resources>
-         
+        <Style TargetType="TextBlock">
+            <Setter Property="FontFamily" Value="Monotype Corsiva"/>
+        </Style> 
     </Application.Resources>
 </Application>

+ 8 - 0
BuzuevaDemo/BuzuevaDemo.csproj

@@ -63,6 +63,7 @@
       <DependentUpon>App.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Classes\ChangePage.cs" />
     <Compile Include="MainWindow.xaml.cs">
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
@@ -94,5 +95,12 @@
   <ItemGroup>
     <None Include="App.config" />
   </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Pages\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Resource Include="Img\Приятный шелест.ico" />
+    <Resource Include="Img\Приятный шелест.png" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 14 - 0
BuzuevaDemo/Classes/ChangePage.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+
+namespace BuzuevaDemo.Classes
+{
+    class ChangePage
+    {
+        public static Frame swithpages;
+    }
+}

二进制
BuzuevaDemo/Img/Приятный шелест.ico


二进制
BuzuevaDemo/Img/Приятный шелест.png


+ 12 - 2
BuzuevaDemo/MainWindow.xaml

@@ -5,8 +5,18 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:BuzuevaDemo"
         mc:Ignorable="d"
-        Title="MainWindow" Height="450" Width="800">
+        Title="Приятный шелест" Height="450" Width="800" Icon="/Img/Приятный шелест.ico">
     <Grid>
-        
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="100"/>
+            <ColumnDefinition Width="*"/>
+        </Grid.ColumnDefinitions>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="100"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <Image Source="/Img/Приятный шелест.png" Grid.Row="0" Grid.Column="0"/>
+        <TextBlock Text="Приятный шелест" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="40" FontFamily="Monotype Corsiva"/>
+        <Frame Grid.Row="1" Grid.ColumnSpan ="2"/>
     </Grid>
 </Window>