mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Text boxes - Fixed the hitbox so that you can click anywhere in a textbox to start typing
This commit is contained in:
parent
486fb88c50
commit
ba45bdd99d
@ -45,7 +45,7 @@
|
||||
|
||||
<!-- Add Styles Here -->
|
||||
<Style Selector="TextBox.condensed">
|
||||
<Setter Property="Padding" Value="2" />
|
||||
<Setter Property="Padding" Value="6 1" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="MinHeight" Value="24" />
|
||||
</Style>
|
||||
|
||||
@ -10,7 +10,8 @@
|
||||
<!-- Add Controls for Previewer Here -->
|
||||
<TextBox Text="99999999"
|
||||
attached:TextBoxAssist.PrefixText="%"
|
||||
attached:TextBoxAssist.SuffixText="%"></TextBox>
|
||||
attached:TextBoxAssist.SuffixText="%">
|
||||
</TextBox>
|
||||
<controls:NumberBox Value="99999999"
|
||||
attached:NumberBoxAssist.PrefixText="%"
|
||||
attached:NumberBoxAssist.SuffixText="%" />
|
||||
@ -50,17 +51,30 @@
|
||||
Margin="{TemplateBinding BorderThickness}">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<ContentPresenter Grid.Column="0" Content="{TemplateBinding InnerLeftContent}" />
|
||||
<DockPanel x:Name="PART_InnerDockPanel" Grid.Column="1" Margin="{TemplateBinding Padding}">
|
||||
<TextBlock Name="PART_Prefix"
|
||||
Text="{TemplateBinding attached:TextBoxAssist.PrefixText}"
|
||||
IsHitTestVisible="False"
|
||||
DockPanel.Dock="Left"/>
|
||||
<TextBlock Name="PART_FloatingWatermark"
|
||||
<Grid x:Name="PART_InnerGrid"
|
||||
Grid.Column="1"
|
||||
RowDefinitions="Auto,Auto"
|
||||
ColumnDefinitions="Auto,*,Auto"
|
||||
Cursor="IBeam"
|
||||
Margin="{TemplateBinding Padding}">
|
||||
<TextBlock Grid.Row="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Name="PART_FloatingWatermark"
|
||||
Foreground="{DynamicResource SystemAccentColor}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Text="{TemplateBinding Watermark}"
|
||||
DockPanel.Dock="Top" />
|
||||
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
Text="{TemplateBinding Watermark}" />
|
||||
|
||||
<TextBlock Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Name="PART_Prefix"
|
||||
Text="{TemplateBinding attached:TextBoxAssist.PrefixText}"
|
||||
IsVisible="{TemplateBinding attached:TextBoxAssist.PrefixText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||
IsHitTestVisible="False"
|
||||
DockPanel.Dock="Left" />
|
||||
|
||||
<ScrollViewer Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
||||
<Panel>
|
||||
<TextBlock Name="PART_Watermark"
|
||||
@ -88,12 +102,14 @@
|
||||
</Panel>
|
||||
</ScrollViewer>
|
||||
|
||||
<TextBlock Name="PART_Suffix"
|
||||
<TextBlock Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
Name="PART_Suffix"
|
||||
Text="{TemplateBinding attached:TextBoxAssist.SuffixText}"
|
||||
IsVisible="{TemplateBinding attached:TextBoxAssist.SuffixText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||
IsHitTestVisible="False"
|
||||
HorizontalAlignment="Right"
|
||||
DockPanel.Dock="Right"/>
|
||||
</DockPanel>
|
||||
HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
<ContentPresenter Grid.Column="2" Content="{TemplateBinding InnerRightContent}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user