Skip to content

Commit 39f1d5f

Browse files
committed
removing description and fix for making variable to be editable
1 parent 4a9e604 commit 39f1d5f

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

Meowlicious/ViewModels/AddRecipeViewModel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public AddRecipeViewModel(
6464
Name = recipe.Name,
6565
Description = recipe.Description,
6666
RequiredTime = recipe.RequiredTime,
67+
IsFavorite = recipe.IsFavorite,
68+
Making = recipe.Making,
6769
ImageBytes = recipe.ImageBytes?.ToArray(),
6870
Ingredients = new ObservableCollection<Ingredient>(
6971
recipe.Ingredients.Select(i => new Ingredient

Meowlicious/Views/AddRecipeView.axaml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,19 @@
7070
<Grid Grid.Column="1" Margin="10,0,10,0">
7171
<Grid.RowDefinitions>
7272
<RowDefinition Height="*" />
73-
<RowDefinition Height="*" />
74-
<RowDefinition Height="*" />
73+
<RowDefinition Height="Auto" />
7574
</Grid.RowDefinitions>
75+
7676
<TextBox
7777
Grid.Row="0"
78-
VerticalContentAlignment="Center"
78+
VerticalContentAlignment="Top"
7979
FontSize="24"
8080
FontWeight="Bold"
8181
Text="{Binding RecipeDraft.Name}"
8282
Watermark="{Binding L[RecipeNameWatermark]}" />
83-
<TextBox
84-
Grid.Row="1"
85-
Margin="0,5,0,0"
86-
VerticalContentAlignment="Center"
87-
FontSize="20"
88-
MaxLines="3"
89-
Opacity="0.8"
90-
Text="{Binding RecipeDraft.Description}"
91-
TextWrapping="Wrap"
92-
Watermark="{Binding L[DescriptionWatermark]}" />
9383

9484
<TextBox
95-
Grid.Row="2"
85+
Grid.Row="1"
9686
Margin="0,5,0,0"
9787
VerticalContentAlignment="Center"
9888
FontSize="18"

Meowlicious/Views/AddRecipeView.axaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ private void OnNumericTextBoxKeyDown(object? sender, KeyEventArgs e)
2121

2222
if (!e.KeyModifiers.HasFlag(KeyModifiers.Shift) &&
2323
((e.Key >= Key.D0 && e.Key <= Key.D9) ||
24-
(e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9)))
24+
(e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9) ||
25+
e.Key == Key.Decimal || e.Key == Key.OemPeriod || e.Key == Key.OemComma))
2526
{
2627
return;
2728
}

0 commit comments

Comments
 (0)