|
27 | 27 | </Grid.Resources> |
28 | 28 |
|
29 | 29 | <Grid.RowDefinitions> |
30 | | - <RowDefinition Height="Auto"/> |
31 | 30 | <RowDefinition Height="Auto"/> |
32 | 31 | <RowDefinition Height="Auto"/> |
33 | 32 | <RowDefinition Height="*"/> |
34 | 33 | <RowDefinition Height="Auto"/> |
35 | 34 | </Grid.RowDefinitions> |
36 | 35 |
|
37 | | - |
38 | | - <Label Grid.Row="0" Content="Add code" FontFamily="{StaticResource poppins_semibold}" Foreground="{Binding textBoxForeground}" FontSize="20" Margin="10,5,0,0"/> |
39 | | - |
40 | | - <Grid Grid.Row="1"> |
| 36 | + <Grid Grid.Row="0"> |
41 | 37 | <Grid.ColumnDefinitions> |
42 | 38 | <ColumnDefinition Width="Auto"/> |
43 | 39 | <ColumnDefinition Width="Auto"/> |
44 | 40 | </Grid.ColumnDefinitions> |
45 | 41 |
|
46 | 42 | <Grid Grid.Column="0"> |
47 | | - <Border BorderThickness="0" Background="{Binding textBoxBackground}" Margin="10,0,5,5" CornerRadius="8" Height="38"> |
| 43 | + <Border BorderThickness="0" Background="{Binding textBoxBackground}" Margin="10,18,5,5" CornerRadius="8" Height="38"> |
48 | 44 | <Grid> |
49 | 45 | <TextBox x:Name="titleEntry" MaxLength="40" Margin="5,0,25,0" Width="400" VerticalContentAlignment="Center" |
50 | 46 | Background="{Binding textBoxBackground}" Foreground="{Binding textBoxForeground}" |
|
85 | 81 | </Grid> |
86 | 82 | </Grid> |
87 | 83 |
|
88 | | - <Border Grid.Row="2" BorderThickness="0" Background="{Binding textBoxBackground}" Margin="10,15,5,5" CornerRadius="8" Height="68" HorizontalAlignment="Left" Width="600"> |
| 84 | + <Border Grid.Row="1" BorderThickness="0" Background="{Binding textBoxBackground}" Margin="10,15,5,5" CornerRadius="8" Height="68" HorizontalAlignment="Left" Width="600"> |
89 | 85 | <Grid> |
90 | | - <TextBox x:Name="descEntry" Margin="5,7,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top" MaxLength="120" |
| 86 | + <TextBox x:Name="descEntry" Margin="5,7,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MaxLength="120" |
91 | 87 | Background="{Binding textBoxBackground}" Foreground="{Binding textBoxForeground}" TextWrapping="Wrap" |
92 | 88 | Text="{Binding desc}" FontFamily="{StaticResource poppins_regular}" FontSize="15" BorderThickness="0"/> |
93 | 89 |
|
|
107 | 103 | </Grid> |
108 | 104 | </Border> |
109 | 105 |
|
110 | | - <Border Grid.Row="3" BorderThickness="0" Background="{Binding textBoxBackground}" Margin="10,15,12,5" CornerRadius="8" |
| 106 | + <Border Grid.Row="2" BorderThickness="0" Background="{Binding textBoxBackground}" Margin="10,15,12,5" CornerRadius="8" |
111 | 107 | HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> |
112 | | - <Grid> |
113 | | - <local:CustomTextEditor x:Name="codeEditor" Margin="5,9,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top" MaxLength="2000" |
| 108 | + <ScrollViewer Style="{StaticResource ScrollViewerStyle}"> |
| 109 | + <Grid> |
| 110 | + <local:CustomTextEditor x:Name="codeEditor" ScrollViewer.HorizontalScrollBarVisibility="Auto" Margin="5,9,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" |
114 | 111 | Background="{Binding textBoxBackground}" Foreground="{Binding textBoxForeground}" TextWrapping="Wrap" AcceptsReturn="True" |
115 | | - Text="{Binding code}" FontFamily="{StaticResource cascadiaMono}" AcceptsTab="True" FontSize="14" BorderThickness="0"/> |
| 112 | + Text="{Binding code}" FontFamily="{StaticResource firacode}" AcceptsTab="True" FontSize="14" BorderThickness="0"/> |
116 | 113 |
|
117 | | - <TextBlock Text="Start by typing your code here ..." FontSize="15" FontFamily="{StaticResource poppins_regular}" |
| 114 | + <TextBlock Text="Start by typing your code here ..." FontSize="15" FontFamily="{StaticResource poppins_regular}" |
118 | 115 | IsHitTestVisible="False" Foreground="#929292" Margin="10,7,0,0"> |
119 | | - <TextBlock.Style> |
120 | | - <Style TargetType="{x:Type TextBlock}"> |
121 | | - <Setter Property="Visibility" Value="Collapsed"/> |
122 | | - <Style.Triggers> |
123 | | - <DataTrigger Binding="{Binding Text, ElementName=codeEditor}" Value=""> |
124 | | - <Setter Property="Visibility" Value="Visible"/> |
125 | | - </DataTrigger> |
126 | | - </Style.Triggers> |
127 | | - </Style> |
128 | | - </TextBlock.Style> |
129 | | - </TextBlock> |
130 | | - </Grid> |
| 116 | + <TextBlock.Style> |
| 117 | + <Style TargetType="{x:Type TextBlock}"> |
| 118 | + <Setter Property="Visibility" Value="Collapsed"/> |
| 119 | + <Style.Triggers> |
| 120 | + <DataTrigger Binding="{Binding Text, ElementName=codeEditor}" Value=""> |
| 121 | + <Setter Property="Visibility" Value="Visible"/> |
| 122 | + </DataTrigger> |
| 123 | + </Style.Triggers> |
| 124 | + </Style> |
| 125 | + </TextBlock.Style> |
| 126 | + </TextBlock> |
| 127 | + </Grid> |
| 128 | + </ScrollViewer> |
131 | 129 | </Border> |
132 | 130 |
|
133 | | - <Grid Grid.Row="4"> |
134 | | - <Border Background="{Binding textBoxBackground}" BorderThickness="0" Width="90" CornerRadius="7" Height="32" HorizontalAlignment="Center" Margin="5,0,30,7"> |
135 | | - <Button Content="Done" Background="Transparent" BorderThickness="0" FontFamily="{StaticResource poppins_regular}" Foreground="{Binding textBoxForeground}" |
136 | | - FontSize="18" BorderBrush="{Binding richtextBoxBackground}"> |
| 131 | + <Grid Grid.Row="3"> |
| 132 | + <Grid.ColumnDefinitions> |
| 133 | + <ColumnDefinition Width="*"/> |
| 134 | + <ColumnDefinition Width="*"/> |
| 135 | + </Grid.ColumnDefinitions> |
| 136 | + |
| 137 | + <Label Grid.Column="0" Content="{Binding leftText}" HorizontalAlignment="Right" Foreground="Red" FontSize="13" FontFamily="{StaticResource poppins_regular}"/> |
| 138 | + |
| 139 | + <Border Grid.Column="1" Background="{Binding textBoxBackground}" BorderThickness="0" Width="120" CornerRadius="7" Height="32" HorizontalAlignment="Center" Margin="5,0,30,7"> |
| 140 | + <Button Content="Add code" Background="Transparent" BorderThickness="0" FontFamily="{StaticResource poppins_regular}" Foreground="{Binding textBoxForeground}" |
| 141 | + FontSize="18" BorderBrush="{Binding richtextBoxBackground}" Command="{s:Action DoneClicked}"> |
137 | 142 | <Button.Style> |
138 | 143 | <Style TargetType="Button"> |
139 | 144 | <Setter Property="Background" Value="Transparent"/> |
|
0 commit comments