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 -->
|
<!-- Add Styles Here -->
|
||||||
<Style Selector="TextBox.condensed">
|
<Style Selector="TextBox.condensed">
|
||||||
<Setter Property="Padding" Value="2" />
|
<Setter Property="Padding" Value="6 1" />
|
||||||
<Setter Property="FontSize" Value="13" />
|
<Setter Property="FontSize" Value="13" />
|
||||||
<Setter Property="MinHeight" Value="24" />
|
<Setter Property="MinHeight" Value="24" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
<!-- Add Controls for Previewer Here -->
|
<!-- Add Controls for Previewer Here -->
|
||||||
<TextBox Text="99999999"
|
<TextBox Text="99999999"
|
||||||
attached:TextBoxAssist.PrefixText="%"
|
attached:TextBoxAssist.PrefixText="%"
|
||||||
attached:TextBoxAssist.SuffixText="%"></TextBox>
|
attached:TextBoxAssist.SuffixText="%">
|
||||||
|
</TextBox>
|
||||||
<controls:NumberBox Value="99999999"
|
<controls:NumberBox Value="99999999"
|
||||||
attached:NumberBoxAssist.PrefixText="%"
|
attached:NumberBoxAssist.PrefixText="%"
|
||||||
attached:NumberBoxAssist.SuffixText="%" />
|
attached:NumberBoxAssist.SuffixText="%" />
|
||||||
@ -50,17 +51,30 @@
|
|||||||
Margin="{TemplateBinding BorderThickness}">
|
Margin="{TemplateBinding BorderThickness}">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
<ContentPresenter Grid.Column="0" Content="{TemplateBinding InnerLeftContent}" />
|
<ContentPresenter Grid.Column="0" Content="{TemplateBinding InnerLeftContent}" />
|
||||||
<DockPanel x:Name="PART_InnerDockPanel" Grid.Column="1" Margin="{TemplateBinding Padding}">
|
<Grid x:Name="PART_InnerGrid"
|
||||||
<TextBlock Name="PART_Prefix"
|
Grid.Column="1"
|
||||||
Text="{TemplateBinding attached:TextBoxAssist.PrefixText}"
|
RowDefinitions="Auto,Auto"
|
||||||
IsHitTestVisible="False"
|
ColumnDefinitions="Auto,*,Auto"
|
||||||
DockPanel.Dock="Left"/>
|
Cursor="IBeam"
|
||||||
<TextBlock Name="PART_FloatingWatermark"
|
Margin="{TemplateBinding Padding}">
|
||||||
|
<TextBlock Grid.Row="0"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Name="PART_FloatingWatermark"
|
||||||
Foreground="{DynamicResource SystemAccentColor}"
|
Foreground="{DynamicResource SystemAccentColor}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
Text="{TemplateBinding Watermark}"
|
Text="{TemplateBinding Watermark}" />
|
||||||
DockPanel.Dock="Top" />
|
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
<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)}">
|
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
||||||
<Panel>
|
<Panel>
|
||||||
<TextBlock Name="PART_Watermark"
|
<TextBlock Name="PART_Watermark"
|
||||||
@ -88,12 +102,14 @@
|
|||||||
</Panel>
|
</Panel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
||||||
<TextBlock Name="PART_Suffix"
|
<TextBlock Grid.Row="1"
|
||||||
|
Grid.Column="2"
|
||||||
|
Name="PART_Suffix"
|
||||||
Text="{TemplateBinding attached:TextBoxAssist.SuffixText}"
|
Text="{TemplateBinding attached:TextBoxAssist.SuffixText}"
|
||||||
|
IsVisible="{TemplateBinding attached:TextBoxAssist.SuffixText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right" />
|
||||||
DockPanel.Dock="Right"/>
|
</Grid>
|
||||||
</DockPanel>
|
|
||||||
<ContentPresenter Grid.Column="2" Content="{TemplateBinding InnerRightContent}" />
|
<ContentPresenter Grid.Column="2" Content="{TemplateBinding InnerRightContent}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user