Browse Source

Fixed the recipe display

Lera 3 tháng trước cách đây
mục cha
commit
a4f08ee812
1 tập tin đã thay đổi với 10 bổ sung7 xóa
  1. 10 7
      FoodLogProject/Views/Page7.axaml

+ 10 - 7
FoodLogProject/Views/Page7.axaml

@@ -12,31 +12,34 @@
 
 			<StackPanel Name="UserProfile" IsVisible="True">
 				<StackPanel>
-					<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
+					<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
 						<Image  Height="62" Width="62"
 							Source="/Assets/FoodLogLogo.png"/>
 						<TextBlock FontSize="40" Foreground="DarkGreen" FontWeight="Bold" Margin="14,25,0,0">
 							FoodLog
 						</TextBlock>
 					</StackPanel>
-					<TextBlock FontSize="20" Foreground="DarkGreen" FontWeight="Bold" Margin="0,10,0,0" HorizontalAlignment="Center">
+					<TextBlock FontSize="24" Foreground="DarkGreen" FontWeight="Bold" Margin="0,10,0,0" HorizontalAlignment="Center">
 						Каталог Рецептов
 					</TextBlock>
 				</StackPanel>
-				<Button Foreground="White" Background="Green" HorizontalAlignment="Center" Margin="40" Content="На главную" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).LoadPage4}"/>
+				<Button Foreground="White" Background="Green" HorizontalAlignment="Center" Margin="20" Content="На главную" 
+						Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).LoadPage4}"/>
 				<Border Background="White"
 		BorderBrush="LightGray"
 		BorderThickness="2"
 		CornerRadius="16"
 		Padding="40"
 						>
-					<ListBox ItemsSource="{Binding ListRecipes}">
+					<ListBox ItemsSource="{Binding ListRecipes}" MaxWidth="450" Background="White">
 						<ListBox.ItemTemplate>
 							<DataTemplate>
 					<StackPanel >
 						<StackPanel >
-							<TextBlock Text="{Binding RecipeName}" FontSize="20"  FontWeight="Bold" Margin="0,0,0,20" HorizontalAlignment="Center" Name="NameOfRec"/>
-							<Button Foreground="White" Background="Green" HorizontalAlignment="Center" Margin="40" Content="Посмотреть ингридиенты" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).LookRecipe}" CommandParameter="{Binding RecipeId}"/>
+							<TextBlock Text="{Binding RecipeName}" FontSize="20" Foreground="DarkGreen" 
+									   FontWeight="Bold" Margin="0,0,0,20" HorizontalAlignment="Center" Name="NameOfRec"/>
+							<Button Foreground="White" Background="Green" HorizontalAlignment="Center" Margin="10" Content="Посмотреть ингридиенты" 
+									Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).LookRecipe}" CommandParameter="{Binding RecipeId}"/>
 							<TextBlock FontWeight="Bold" Margin="0,0,0,10">Ингредиенты</TextBlock>
 							<ListBox ItemsSource="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).ListIngridient}">
 								<ListBox.ItemTemplate>
@@ -51,7 +54,7 @@
 							</ListBox>
 
 							<TextBlock FontWeight="Bold" Margin="0,10,0,10">Рецепт</TextBlock>
-							<TextBlock Text="{Binding RecipeDescription}"/>
+							<TextBox AcceptsReturn="True" BorderBrush="White" IsReadOnly="True" TextWrapping="Wrap" Text="{Binding RecipeDescription}"/>
 
 						</StackPanel>
 					</StackPanel>