|
@@ -10,73 +10,65 @@
|
|
<Setter Property="SelectionBrush" Value="{DynamicResource TextControlSelectionHighlightColor}" />
|
|
<Setter Property="SelectionBrush" Value="{DynamicResource TextControlSelectionHighlightColor}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
|
|
|
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
|
|
|
<Setter Property="MinHeight" Value="{DynamicResource TextControlThemeMinHeight}" />
|
|
<Setter Property="MinHeight" Value="{DynamicResource TextControlThemeMinHeight}" />
|
|
<Setter Property="MinWidth" Value="{DynamicResource TextControlThemeMinWidth}" />
|
|
<Setter Property="MinWidth" Value="{DynamicResource TextControlThemeMinWidth}" />
|
|
<Setter Property="Padding" Value="{DynamicResource TextControlThemePadding}" />
|
|
<Setter Property="Padding" Value="{DynamicResource TextControlThemePadding}" />
|
|
<Setter Property="Template">
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<ControlTemplate>
|
|
- <Grid RowDefinitions="Auto, *, Auto" ColumnDefinitions="*, Auto">
|
|
|
|
|
|
+ <DockPanel>
|
|
|
|
|
|
<!-- TODO bind Content -> Header and ContentTemplate -> HeaderTemplate -->
|
|
<!-- TODO bind Content -> Header and ContentTemplate -> HeaderTemplate -->
|
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
|
- Grid.Row="0"
|
|
|
|
- Grid.Column="0"
|
|
|
|
- Grid.ColumnSpan="2"
|
|
|
|
|
|
+ DockPanel.Dock="Top"
|
|
TextBlock.FontWeight="Normal"
|
|
TextBlock.FontWeight="Normal"
|
|
TextBlock.Foreground="{DynamicResource TextControlHeaderForeground}"
|
|
TextBlock.Foreground="{DynamicResource TextControlHeaderForeground}"
|
|
IsVisible="False"
|
|
IsVisible="False"
|
|
Margin="{DynamicResource TextBoxTopHeaderMargin}" />
|
|
Margin="{DynamicResource TextBoxTopHeaderMargin}" />
|
|
-
|
|
|
|
- <Border Name="border"
|
|
|
|
- Grid.Row="1"
|
|
|
|
- Grid.Column="0"
|
|
|
|
- Grid.RowSpan="1"
|
|
|
|
- Grid.ColumnSpan="2"
|
|
|
|
- Background="{TemplateBinding Background}"
|
|
|
|
- BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
- BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
- CornerRadius="{DynamicResource ControlCornerRadius}"
|
|
|
|
- Margin="{TemplateBinding BorderThickness}"
|
|
|
|
- MinWidth="{TemplateBinding MinWidth}"
|
|
|
|
- MinHeight="{TemplateBinding MinHeight}">
|
|
|
|
- </Border>
|
|
|
|
-
|
|
|
|
- <Border Padding="{TemplateBinding Padding}"
|
|
|
|
- Grid.Row="1"
|
|
|
|
- Grid.Column="0"
|
|
|
|
- Margin="{TemplateBinding BorderThickness}">
|
|
|
|
- <DockPanel>
|
|
|
|
- <TextBlock Name="floatingWatermark"
|
|
|
|
- Foreground="{DynamicResource SystemAccentColor}"
|
|
|
|
- FontSize="{DynamicResource FontSizeSmall}"
|
|
|
|
- Text="{TemplateBinding Watermark}"
|
|
|
|
- DockPanel.Dock="Top">
|
|
|
|
- <TextBlock.IsVisible>
|
|
|
|
- <MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
|
|
- <Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
|
|
- Path="UseFloatingWatermark"/>
|
|
|
|
- <Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
|
|
- Path="Text"
|
|
|
|
- Converter="{x:Static StringConverters.IsNotNullOrEmpty}"/>
|
|
|
|
- </MultiBinding>
|
|
|
|
- </TextBlock.IsVisible>
|
|
|
|
- </TextBlock>
|
|
|
|
-
|
|
|
|
- <DataValidationErrors>
|
|
|
|
- <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
|
|
|
- VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
|
|
|
-
|
|
|
|
- <Panel>
|
|
|
|
- <TextBlock Name="watermark"
|
|
|
|
|
|
+
|
|
|
|
+ <Panel>
|
|
|
|
+ <Border
|
|
|
|
+ Name="border"
|
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ CornerRadius="{DynamicResource ControlCornerRadius}"
|
|
|
|
+ MinWidth="{TemplateBinding MinWidth}"
|
|
|
|
+ MinHeight="{TemplateBinding MinHeight}">
|
|
|
|
+ </Border>
|
|
|
|
+
|
|
|
|
+ <Border
|
|
|
|
+ Padding="{TemplateBinding Padding}"
|
|
|
|
+ Margin="{TemplateBinding BorderThickness}">
|
|
|
|
+ <DockPanel>
|
|
|
|
+ <TextBlock Name="floatingWatermark"
|
|
|
|
+ Foreground="{DynamicResource SystemAccentColor}"
|
|
|
|
+ FontSize="{DynamicResource FontSizeSmall}"
|
|
|
|
+ Text="{TemplateBinding Watermark}"
|
|
|
|
+ DockPanel.Dock="Top">
|
|
|
|
+ <TextBlock.IsVisible>
|
|
|
|
+ <MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
|
|
+ <Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
|
|
+ Path="UseFloatingWatermark"/>
|
|
|
|
+ <Binding RelativeSource="{RelativeSource TemplatedParent}"
|
|
|
|
+ Path="Text"
|
|
|
|
+ Converter="{x:Static StringConverters.IsNotNullOrEmpty}"/>
|
|
|
|
+ </MultiBinding>
|
|
|
|
+ </TextBlock.IsVisible>
|
|
|
|
+ </TextBlock>
|
|
|
|
+
|
|
|
|
+ <DataValidationErrors>
|
|
|
|
+ <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
|
|
|
+ VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
|
|
|
+
|
|
|
|
+ <Panel>
|
|
|
|
+ <TextBlock Name="watermark"
|
|
Opacity="0.5"
|
|
Opacity="0.5"
|
|
Text="{TemplateBinding Watermark}"
|
|
Text="{TemplateBinding Watermark}"
|
|
TextAlignment="{TemplateBinding TextAlignment}"
|
|
TextAlignment="{TemplateBinding TextAlignment}"
|
|
TextWrapping="{TemplateBinding TextWrapping}"
|
|
TextWrapping="{TemplateBinding TextWrapping}"
|
|
IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNullOrEmpty}}"/>
|
|
IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNullOrEmpty}}"/>
|
|
- <!-- TODO eliminate this margin... text layout issue? -->
|
|
|
|
- <TextPresenter Name="PART_TextPresenter"
|
|
|
|
|
|
+ <!-- TODO eliminate this margin... text layout issue? -->
|
|
|
|
+ <TextPresenter Name="PART_TextPresenter"
|
|
Margin="0 1 0 0"
|
|
Margin="0 1 0 0"
|
|
Text="{TemplateBinding Text, Mode=TwoWay}"
|
|
Text="{TemplateBinding Text, Mode=TwoWay}"
|
|
CaretIndex="{TemplateBinding CaretIndex}"
|
|
CaretIndex="{TemplateBinding CaretIndex}"
|
|
@@ -88,12 +80,13 @@
|
|
SelectionBrush="{TemplateBinding SelectionBrush}"
|
|
SelectionBrush="{TemplateBinding SelectionBrush}"
|
|
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
|
|
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
|
|
CaretBrush="{TemplateBinding CaretBrush}"/>
|
|
CaretBrush="{TemplateBinding CaretBrush}"/>
|
|
- </Panel>
|
|
|
|
- </ScrollViewer>
|
|
|
|
- </DataValidationErrors>
|
|
|
|
- </DockPanel>
|
|
|
|
- </Border>
|
|
|
|
- </Grid>
|
|
|
|
|
|
+ </Panel>
|
|
|
|
+ </ScrollViewer>
|
|
|
|
+ </DataValidationErrors>
|
|
|
|
+ </DockPanel>
|
|
|
|
+ </Border>
|
|
|
|
+ </Panel>
|
|
|
|
+ </DockPanel>
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</Setter>
|
|
</Style>
|
|
</Style>
|