Prechádzať zdrojové kódy

style: style improvement

Otter 4 mesiacov pred
rodič
commit
e31a9c71a8

+ 44 - 43
HelloItQuantum/Views/GameCreateFriendView.axaml

@@ -2,7 +2,7 @@
              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"
-             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+             mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="800"
              x:Class="HelloItQuantum.Views.GameCreateFriendView"
 			 x:DataType="vm:MainWindowViewModel"
 			 xmlns:vm="using:HelloItQuantum.ViewModels">
@@ -27,11 +27,10 @@
 		</Style>
 	</UserControl.Styles>
 
-	<ScrollViewer>
-		<StackPanel Background="#006838">
-			<Grid ColumnDefinitions="auto, auto" RowDefinitions="*, auto" Margin="20" HorizontalAlignment="Center">
+		<Panel Background="#006838">
+			<Grid ColumnDefinitions="auto, auto" RowDefinitions="*, auto" Margin="5 20" HorizontalAlignment="Center">
 
-				<Grid Grid.Column="0" Grid.Row="0" ColumnDefinitions="60, 200, 20, 140, 20, 300, 30" RowDefinitions="auto, 20, *">
+				<Grid Grid.Column="0" Grid.Row="0" ColumnDefinitions="60, 200, 20, 140, 20, 300, 40" RowDefinitions="auto, 10, *">
 
 					<Border Grid.Column="1"  Grid.Row="0" CornerRadius="10" Background="#E6EFD8">
 						<TextBlock Text="Фигура" VerticalAlignment="Stretch" Margin="10" TextAlignment="Center"/>
@@ -44,44 +43,45 @@
 					<Border Grid.Column="5" Grid.Row="0" CornerRadius="10" Background="#E6EFD8">
 						<TextBlock Text="Положение" VerticalAlignment="Stretch" Margin="10" TextAlignment="Center"/>
 					</Border>
-
-					<StackPanel Grid.ColumnSpan="7" Grid.Row="2">
-						<ItemsControl ItemsSource="{Binding GameCreateFriendVM.ListElements}">
-							<ItemsControl.ItemTemplate>
-								<DataTemplate>
-									<Grid ColumnDefinitions="40, 20, *, 30" Margin="0 10">
-										
-										<Button Grid.Column="0" Background="#F26527" Width="40" Command="{Binding Delete}"
-												VerticalAlignment="Stretch">
-											<Svg Path="/Assets/ImgCreateFriend/delete.svg" Width="20"/>
-										</Button>
-										
-										<Border Grid.Column="2" CornerRadius="10"
-												Background="#7CBE41"
-												HorizontalAlignment="Stretch"
-												Padding="10">
-											<StackPanel Orientation="Horizontal">
-												<ComboBox ItemsSource="{Binding CbElement}" SelectedIndex="{Binding SelectedElementIndex}"
-														  Width="180" Height="125" Margin="0 0 40 0"/>
-												<ComboBox ItemsSource="{Binding CbColor}" SelectedIndex="{Binding SelectedColorIndex}"
-														  Width="120" Height="125" Margin="0 0 40 0"/>			
-												<ComboBox ItemsSource="{Binding CbNavigateOne}" SelectedIndex="{Binding SelectedNavigateOne}" IsVisible="{Binding IsVisibleNavigateOne}"
-														  Width="130" Height="125" Margin="0 0 10 0"/>
-												<ComboBox ItemsSource="{Binding CbNavigateTwo}" SelectedIndex="{Binding SelectedNavigateTwo}" IsVisible="{Binding IsVisibleNavigateTwo}"
-														  Width="130" Height="125"/>											
-											</StackPanel>
-										</Border>
-									</Grid>
-								</DataTemplate>
-							</ItemsControl.ItemTemplate>
-						</ItemsControl>
-						<Button Content="+" Command="{Binding GameCreateFriendVM.ClickCreateElement}"
-								Background="#E6EFD8" Margin="60 0 30 0" HorizontalAlignment="Stretch"/>
-					</StackPanel>
-
+					
+					<ScrollViewer Grid.ColumnSpan="7" Grid.Row="2" VerticalAlignment="Top" Margin="0 0 20 0">
+						<Grid RowDefinitions="auto, auto">
+							
+							<ItemsControl Grid.Row="0" ItemsSource="{Binding GameCreateFriendVM.ListElements}">
+								<ItemsControl.ItemTemplate>
+									<DataTemplate>
+										<Grid ColumnDefinitions="40, 20, *, 20" Margin="0 10">
+											<Button Grid.Column="0" Background="#F26527" Width="40" Command="{Binding Delete}" VerticalAlignment="Stretch">
+												<Svg Path="/Assets/ImgCreateFriend/delete.svg" Width="20"/>
+											</Button>
+											<Border Grid.Column="2" CornerRadius="10"
+													Background="#7CBE41"
+													HorizontalAlignment="Stretch"
+													Padding="10">
+												<StackPanel Orientation="Horizontal">
+													<ComboBox ItemsSource="{Binding CbElement}" SelectedIndex="{Binding SelectedElementIndex}"
+															  Width="180" Height="125" Margin="0 0 40 0"/>
+													<ComboBox ItemsSource="{Binding CbColor}" SelectedIndex="{Binding SelectedColorIndex}"
+															  Width="120" Height="125" Margin="0 0 40 0"/>
+													<ComboBox ItemsSource="{Binding CbNavigateOne}" SelectedIndex="{Binding SelectedNavigateOne}" IsVisible="{Binding IsVisibleNavigateOne}"
+															  Width="130" Height="125" Margin="0 0 10 0"/>
+													<ComboBox ItemsSource="{Binding CbNavigateTwo}" SelectedIndex="{Binding SelectedNavigateTwo}" IsVisible="{Binding IsVisibleNavigateTwo}"
+															  Width="130" Height="125"/>
+												</StackPanel>
+											</Border>
+										</Grid>
+									</DataTemplate>
+								</ItemsControl.ItemTemplate>
+							</ItemsControl>
+	
+							<Button Grid.Row="1" Content="+" Command="{Binding GameCreateFriendVM.ClickCreateElement}"
+									Background="#E6EFD8" Margin="60 0 20 0" HorizontalAlignment="Stretch"/>
+						</Grid>
+					</ScrollViewer>
+					
 				</Grid>
 
-				<Panel Grid.Column="1" Grid.Row="0" VerticalAlignment="Bottom" Width="400" Margin="0 0 0 20">
+				<Panel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" Width="400">
 					<Image Source="/Assets/ImgCreateFriend/img_friend.png" Width="400"/>
 					<Image Source="/Assets/ImgCreateFriend/hello.png" Width="150" Margin="0 0 140 -100"
 						   IsVisible="{Binding GameCreateFriendVM.IsVisibleHello}"/>
@@ -96,6 +96,7 @@
 						Margin="0 30"
 						Background="{Binding GameCreateFriendVM.BtnColor}"/>
 			</Grid>
-		</StackPanel>
-	</ScrollViewer>
+		</Panel>
+
+	
 </UserControl>

+ 2 - 2
HelloItQuantum/Views/MainWindow.axaml

@@ -8,8 +8,8 @@
         x:DataType="vm:MainWindowViewModel"
         Icon="/Assets/avalonia-logo.ico"
         Title="HelloItQuantum"
-		MinWidth="900"
-		MinHeight="500">
+		MinWidth="1000"
+		MinHeight="700">
 
     <Design.DataContext>
         <!-- This only sets the DataContext for the previewer in an IDE,