|
217 | 217 | </Setter>
|
218 | 218 | </xamarin:Style>
|
219 | 219 |
|
220 |
| - <!--Default style for Windows.UI.Xaml.Controls.TextBox--> |
| 220 | + <!-- Default style for Windows.UI.Xaml.Controls.TextBox --> |
| 221 | + <Thickness x:Key="TextBoxTopHeaderMargin">0,0,0,4</Thickness> |
| 222 | + |
221 | 223 | <Style x:Key="XamlDefaultTextBox"
|
222 |
| - TargetType="TextBox"> |
| 224 | + TargetType="TextBox"> |
223 | 225 | <Setter Property="MinWidth"
|
224 | 226 | Value="{ThemeResource TextControlThemeMinWidth}" />
|
225 | 227 | <Setter Property="MinHeight"
|
|
341 | 343 | <VisualState x:Name="ButtonCollapsed" />
|
342 | 344 | </VisualStateGroup>
|
343 | 345 | </VisualStateManager.VisualStateGroups>
|
344 |
| - <Grid.ColumnDefinitions> |
345 |
| - <ColumnDefinition Width="*" /> |
346 |
| - <ColumnDefinition Width="Auto" /> |
347 |
| - </Grid.ColumnDefinitions> |
348 | 346 | <Grid.RowDefinitions>
|
349 | 347 | <RowDefinition Height="Auto" />
|
350 | 348 | <RowDefinition Height="*" />
|
| 349 | + <RowDefinition Height="Auto" /> |
351 | 350 | </Grid.RowDefinitions>
|
| 351 | + <Grid.ColumnDefinitions> |
| 352 | + <ColumnDefinition Width="*" /> |
| 353 | + <ColumnDefinition Width="Auto" /> |
| 354 | + </Grid.ColumnDefinitions> |
| 355 | + <ContentPresenter x:Name="HeaderContentPresenter" |
| 356 | + Grid.Row="0" |
| 357 | + Grid.Column="0" |
| 358 | + Grid.ColumnSpan="2" |
| 359 | + Margin="{ThemeResource TextBoxTopHeaderMargin}" |
| 360 | + VerticalAlignment="Top" |
| 361 | + x:DeferLoadStrategy="Lazy" |
| 362 | + Content="{TemplateBinding Header}" |
| 363 | + ContentTemplate="{TemplateBinding HeaderTemplate}" |
| 364 | + FontWeight="Normal" |
| 365 | + Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}" |
| 366 | + TextWrapping="Wrap" |
| 367 | + Visibility="Collapsed" /> |
352 | 368 | <Border x:Name="BackgroundElement"
|
353 | 369 | Grid.Row="1"
|
354 |
| - Background="{TemplateBinding Background}" |
| 370 | + Grid.RowSpan="1" |
| 371 | + Grid.ColumnSpan="2" |
355 | 372 | Margin="{TemplateBinding BorderThickness}"
|
356 |
| - Opacity="{ThemeResource TextControlBackgroundRestOpacity}" |
| 373 | + Background="{TemplateBinding Background}" |
357 | 374 | CornerRadius="{TemplateBinding CornerRadius}"
|
358 |
| - Grid.ColumnSpan="2" |
359 |
| - Grid.RowSpan="1" /> |
| 375 | + Opacity="{ThemeResource TextControlBackgroundRestOpacity}" /> |
360 | 376 | <Border x:Name="BorderElement"
|
361 | 377 | Grid.Row="1"
|
| 378 | + Grid.RowSpan="1" |
| 379 | + Grid.Column="0" |
| 380 | + Grid.ColumnSpan="2" |
| 381 | + MinWidth="{ThemeResource TextControlThemeMinWidth}" |
| 382 | + MinHeight="{ThemeResource TextControlThemeMinHeight}" |
| 383 | + Background="{TemplateBinding Background}" |
362 | 384 | BorderBrush="{TemplateBinding BorderBrush}"
|
363 | 385 | BorderThickness="{TemplateBinding BorderThickness}"
|
364 |
| - CornerRadius="{TemplateBinding CornerRadius}" |
365 |
| - Grid.ColumnSpan="2" |
366 |
| - Grid.RowSpan="1" /> |
367 |
| - <ContentPresenter x:Name="HeaderContentPresenter" |
368 |
| - x:DeferLoadStrategy="Lazy" |
369 |
| - Visibility="Collapsed" |
370 |
| - Grid.Row="0" |
371 |
| - Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}" |
372 |
| - Margin="0,0,0,8" |
373 |
| - Grid.ColumnSpan="2" |
374 |
| - Content="{TemplateBinding Header}" |
375 |
| - ContentTemplate="{TemplateBinding HeaderTemplate}" |
376 |
| - FontWeight="Normal" /> |
| 386 | + Control.IsTemplateFocusTarget="True" |
| 387 | + CornerRadius="{TemplateBinding CornerRadius}" /> |
377 | 388 | <ScrollViewer x:Name="ContentElement"
|
378 | 389 | Grid.Row="1"
|
379 |
| - HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" |
380 |
| - HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" |
381 |
| - VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" |
382 |
| - VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" |
383 |
| - IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" |
384 |
| - IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" |
385 |
| - IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" |
| 390 | + Grid.Column="0" |
386 | 391 | Margin="{TemplateBinding BorderThickness}"
|
387 | 392 | Padding="{TemplateBinding Padding}"
|
388 |
| - IsTabStop="False" |
389 | 393 | AutomationProperties.AccessibilityView="Raw"
|
| 394 | + HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" |
| 395 | + HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" |
| 396 | + IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" |
| 397 | + IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" |
| 398 | + IsTabStop="False" |
| 399 | + IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" |
| 400 | + VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" |
| 401 | + VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" |
390 | 402 | ZoomMode="Disabled" />
|
391 |
| - <ContentControl x:Name="PlaceholderTextContentPresenter" |
392 |
| - Grid.Row="1" |
393 |
| - Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}" |
394 |
| - Margin="{TemplateBinding BorderThickness}" |
395 |
| - Padding="{TemplateBinding Padding}" |
396 |
| - IsTabStop="False" |
397 |
| - Grid.ColumnSpan="2" |
398 |
| - Content="{TemplateBinding PlaceholderText}" |
399 |
| - IsHitTestVisible="False" /> |
| 403 | + <TextBlock x:Name="PlaceholderTextContentPresenter" |
| 404 | + Grid.Row="1" |
| 405 | + Grid.Column="0" |
| 406 | + Grid.ColumnSpan="2" |
| 407 | + Margin="{TemplateBinding BorderThickness}" |
| 408 | + Padding="{TemplateBinding Padding}" |
| 409 | + Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}" |
| 410 | + IsHitTestVisible="False" |
| 411 | + Text="{TemplateBinding PlaceholderText}" |
| 412 | + TextAlignment="{TemplateBinding TextAlignment}" |
| 413 | + TextWrapping="{TemplateBinding TextWrapping}" /> |
400 | 414 | <Button x:Name="DeleteButton"
|
401 | 415 | Grid.Row="1"
|
402 |
| - Style="{StaticResource DeleteButtonStyle}" |
403 |
| - BorderThickness="{TemplateBinding BorderThickness}" |
404 |
| - Margin="{ThemeResource HelperButtonThemePadding}" |
405 |
| - IsTabStop="False" |
406 | 416 | Grid.Column="1"
|
407 |
| - Visibility="Collapsed" |
408 |
| - FontSize="{TemplateBinding FontSize}" |
409 | 417 | MinWidth="34"
|
410 |
| - VerticalAlignment="Stretch" /> |
| 418 | + Margin="{ThemeResource HelperButtonThemePadding}" |
| 419 | + VerticalAlignment="Stretch" |
| 420 | + AutomationProperties.AccessibilityView="Raw" |
| 421 | + BorderThickness="{TemplateBinding BorderThickness}" |
| 422 | + FontSize="{TemplateBinding FontSize}" |
| 423 | + IsTabStop="False" |
| 424 | + Style="{StaticResource DeleteButtonStyle}" |
| 425 | + Visibility="Collapsed" /> |
| 426 | + <ContentPresenter x:Name="DescriptionPresenter" |
| 427 | + Grid.Row="2" |
| 428 | + Grid.Column="0" |
| 429 | + Grid.ColumnSpan="2" |
| 430 | + x:Load="False" |
| 431 | + AutomationProperties.AccessibilityView="Raw" |
| 432 | + Content="{TemplateBinding Description}" |
| 433 | + Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}" /> |
411 | 434 | </Grid>
|
412 | 435 | </ControlTemplate>
|
413 | 436 | </Setter.Value>
|
|
0 commit comments