Browse Source

use correct case for class names.

pull/4567/head
Dan Walmsley 6 years ago
parent
commit
8caa9a0966
  1. 10
      src/Avalonia.Themes.Default/TextBox.xaml
  2. 54
      src/Avalonia.Themes.Fluent/TextBox.xaml

10
src/Avalonia.Themes.Default/TextBox.xaml

@ -106,7 +106,7 @@
<Setter Property="(ToolTip.Tip)" Value="Show Password" /> <Setter Property="(ToolTip.Tip)" Value="Show Password" />
</Style> </Style>
</Panel.Styles> </Panel.Styles>
<ToggleButton Classes="PasswordBoxRevealButton" Background="Transparent" Cursor="Arrow" IsChecked="{Binding $parent[TextBox].RevealPassword, Mode=TwoWay}" /> <ToggleButton Classes="passwordBoxRevealButton" Background="Transparent" Cursor="Arrow" IsChecked="{Binding $parent[TextBox].RevealPassword, Mode=TwoWay}" />
</Panel> </Panel>
</Template> </Template>
</Setter> </Setter>
@ -118,7 +118,7 @@
<Setter Property="MinWidth" Value="400" /> <Setter Property="MinWidth" Value="400" />
</Style> </Style>
<Style Selector="ToggleButton.PasswordBoxRevealButton"> <Style Selector="ToggleButton.passwordBoxRevealButton">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">
@ -149,15 +149,15 @@
</Setter> </Setter>
</Style> </Style>
<Style Selector="ToggleButton.PasswordBoxRevealButton:not(ToggleButton:checked) /template/ Path#PART_GlyphElement_Hide"> <Style Selector="ToggleButton.passwordBoxRevealButton:not(ToggleButton:checked) /template/ Path#PART_GlyphElement_Hide">
<Setter Property="IsVisible" Value="False" /> <Setter Property="IsVisible" Value="False" />
</Style> </Style>
<Style Selector="ToggleButton.PasswordBoxRevealButton:checked /template/ Path#PART_GlyphElement_Reveal"> <Style Selector="ToggleButton.passwordBoxRevealButton:checked /template/ Path#PART_GlyphElement_Reveal">
<Setter Property="IsVisible" Value="False" /> <Setter Property="IsVisible" Value="False" />
</Style> </Style>
<Style Selector="Button.TextBoxClearButton, ToggleButton.PasswordBoxRevealButton"> <Style Selector="Button.textBoxClearButton, ToggleButton.passwordBoxRevealButton">
<Setter Property="Focusable" Value="False" /> <Setter Property="Focusable" Value="False" />
</Style> </Style>
</Styles> </Styles>

54
src/Avalonia.Themes.Fluent/TextBox.xaml

@ -170,7 +170,7 @@
<Style Selector="TextBox.revealPasswordButton[AcceptsReturn=False][IsReadOnly=False]:not(TextBox:empty)"> <Style Selector="TextBox.revealPasswordButton[AcceptsReturn=False][IsReadOnly=False]:not(TextBox:empty)">
<Setter Property="InnerRightContent"> <Setter Property="InnerRightContent">
<Template> <Template>
<ToggleButton Classes="PasswordBoxRevealButton" <ToggleButton Classes="passwordBoxRevealButton"
IsChecked="{Binding $parent[TextBox].RevealPassword, Mode=TwoWay}" /> IsChecked="{Binding $parent[TextBox].RevealPassword, Mode=TwoWay}" />
</Template> </Template>
</Setter> </Setter>
@ -179,13 +179,13 @@
<Style Selector="TextBox.clearButton[AcceptsReturn=False][IsReadOnly=False]:focus:not(TextBox:empty)"> <Style Selector="TextBox.clearButton[AcceptsReturn=False][IsReadOnly=False]:focus:not(TextBox:empty)">
<Setter Property="InnerRightContent"> <Setter Property="InnerRightContent">
<Template> <Template>
<Button Classes="TextBoxClearButton" <Button Classes="textBoxClearButton"
Command="{Binding $parent[TextBox].Clear}" /> Command="{Binding $parent[TextBox].Clear}" />
</Template> </Template>
</Setter> </Setter>
</Style> </Style>
<Style Selector="ToggleButton.PasswordBoxRevealButton"> <Style Selector="ToggleButton.passwordBoxRevealButton">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="ToggleButton"> <ControlTemplate TargetType="ToggleButton">
@ -213,7 +213,7 @@
</Setter> </Setter>
</Style> </Style>
<Style Selector="Button.TextBoxClearButton"> <Style Selector="Button.textBoxClearButton">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
@ -233,60 +233,60 @@
</Style> </Style>
<!-- TextBox.Button Normal State --> <!-- TextBox.Button Normal State -->
<Style Selector="Button.TextBoxClearButton, ToggleButton.PasswordBoxRevealButton"> <Style Selector="Button.textBoxClearButton, ToggleButton.passwordBoxRevealButton">
<Setter Property="MinWidth" Value="34" /> <Setter Property="MinWidth" Value="34" />
<Setter Property="Width" Value="{Binding $self.Bounds.Height}"/> <Setter Property="Width" Value="{Binding $self.Bounds.Height}"/>
<Setter Property="Focusable" Value="False" /> <Setter Property="Focusable" Value="False" />
<Setter Property="VerticalAlignment" Value="Stretch" /> <Setter Property="VerticalAlignment" Value="Stretch" />
</Style> </Style>
<Style Selector="Button.TextBoxClearButton /template/ Border#PART_ButtonLayoutBorder, <Style Selector="Button.textBoxClearButton /template/ Border#PART_ButtonLayoutBorder,
ToggleButton.PasswordBoxRevealButton /template/ Border#PART_ButtonLayoutBorder"> ToggleButton.passwordBoxRevealButton /template/ Border#PART_ButtonLayoutBorder">
<Setter Property="Background" Value="{DynamicResource TextControlButtonBackground}" /> <Setter Property="Background" Value="{DynamicResource TextControlButtonBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrush}" />
</Style> </Style>
<Style Selector="Button.TextBoxClearButton /template/ Path#PART_GlyphElement, <Style Selector="Button.textBoxClearButton /template/ Path#PART_GlyphElement,
ToggleButton.PasswordBoxRevealButton /template/ Path#PART_GlyphElement_Reveal, ToggleButton.passwordBoxRevealButton /template/ Path#PART_GlyphElement_Reveal,
ToggleButton.PasswordBoxRevealButton /template/ Path#PART_GlyphElement_Hide"> ToggleButton.passwordBoxRevealButton /template/ Path#PART_GlyphElement_Hide">
<Setter Property="Fill" Value="{DynamicResource TextControlButtonForeground}" /> <Setter Property="Fill" Value="{DynamicResource TextControlButtonForeground}" />
</Style> </Style>
<!-- TextBox.Button PointerOver State --> <!-- TextBox.Button PointerOver State -->
<Style Selector="Button.TextBoxClearButton:pointerover /template/ Border#PART_ButtonLayoutBorder, <Style Selector="Button.textBoxClearButton:pointerover /template/ Border#PART_ButtonLayoutBorder,
ToggleButton.PasswordBoxRevealButton:pointerover /template/ Border#PART_ButtonLayoutBorder"> ToggleButton.passwordBoxRevealButton:pointerover /template/ Border#PART_ButtonLayoutBorder">
<Setter Property="Background" Value="{DynamicResource TextControlButtonBackgroundPointerOver}" /> <Setter Property="Background" Value="{DynamicResource TextControlButtonBackgroundPointerOver}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPointerOver}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPointerOver}" />
</Style> </Style>
<Style Selector="Button.TextBoxClearButton:pointerover /template/ Path#PART_GlyphElement, <Style Selector="Button.textBoxClearButton:pointerover /template/ Path#PART_GlyphElement,
ToggleButton.PasswordBoxRevealButton:pointerover /template/ Path#PART_GlyphElement_Reveal, ToggleButton.passwordBoxRevealButton:pointerover /template/ Path#PART_GlyphElement_Reveal,
ToggleButton.PasswordBoxRevealButton:pointerover /template/ Path#PART_GlyphElement_Hide"> ToggleButton.passwordBoxRevealButton:pointerover /template/ Path#PART_GlyphElement_Hide">
<Setter Property="Fill" Value="{DynamicResource TextControlButtonForegroundPointerOver}" /> <Setter Property="Fill" Value="{DynamicResource TextControlButtonForegroundPointerOver}" />
</Style> </Style>
<!-- TextBox.Button Pressed State --> <!-- TextBox.Button Pressed State -->
<Style Selector="Button.TextBoxClearButton:pressed /template/ Border#PART_ButtonLayoutBorder, <Style Selector="Button.textBoxClearButton:pressed /template/ Border#PART_ButtonLayoutBorder,
ToggleButton.PasswordBoxRevealButton:pressed /template/ Border#PART_ButtonLayoutBorder, ToggleButton.passwordBoxRevealButton:pressed /template/ Border#PART_ButtonLayoutBorder,
ToggleButton.PasswordBoxRevealButton:checked /template/ Border#PART_ButtonLayoutBorder, ToggleButton.passwordBoxRevealButton:checked /template/ Border#PART_ButtonLayoutBorder,
ToggleButton.PasswordBoxRevealButton:indeterminate /template/ Border#PART_ButtonLayoutBorder"> ToggleButton.passwordBoxRevealButton:indeterminate /template/ Border#PART_ButtonLayoutBorder">
<Setter Property="Background" Value="{DynamicResource TextControlButtonBackgroundPressed}" /> <Setter Property="Background" Value="{DynamicResource TextControlButtonBackgroundPressed}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPressed}" /> <Setter Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPressed}" />
</Style> </Style>
<Style Selector="Button.TextBoxClearButton:pressed /template/ Path#PART_GlyphElement, <Style Selector="Button.textBoxClearButton:pressed /template/ Path#PART_GlyphElement,
ToggleButton.PasswordBoxRevealButton:pressed /template/ Path#PART_GlyphElement_Reveal, ToggleButton.passwordBoxRevealButton:pressed /template/ Path#PART_GlyphElement_Reveal,
ToggleButton.PasswordBoxRevealButton:checked /template/ Path#PART_GlyphElement_Hide, ToggleButton.passwordBoxRevealButton:checked /template/ Path#PART_GlyphElement_Hide,
ToggleButton.PasswordBoxRevealButton:indeterminate /template/ Path#PART_GlyphElement_Reveal"> ToggleButton.passwordBoxRevealButton:indeterminate /template/ Path#PART_GlyphElement_Reveal">
<Setter Property="Fill" Value="{DynamicResource TextControlButtonForegroundPressed}" /> <Setter Property="Fill" Value="{DynamicResource TextControlButtonForegroundPressed}" />
</Style> </Style>
<!-- TextBox.Button Disabled State --> <!-- TextBox.Button Disabled State -->
<Style Selector="Button.TextBoxClearButton:disabled /template/ Border#PART_ButtonLayoutBorder, <Style Selector="Button.textBoxClearButton:disabled /template/ Border#PART_ButtonLayoutBorder,
ToggleButton.PasswordBoxRevealButton:disabled /template/ Border#PART_ButtonLayoutBorder"> ToggleButton.passwordBoxRevealButton:disabled /template/ Border#PART_ButtonLayoutBorder">
<Setter Property="Opacity" Value="0" /> <Setter Property="Opacity" Value="0" />
</Style> </Style>
<Style Selector="ToggleButton.PasswordBoxRevealButton:not(ToggleButton:checked) /template/ Path#PART_GlyphElement_Hide"> <Style Selector="ToggleButton.passwordBoxRevealButton:not(ToggleButton:checked) /template/ Path#PART_GlyphElement_Hide">
<Setter Property="IsVisible" Value="False" /> <Setter Property="IsVisible" Value="False" />
</Style> </Style>
<Style Selector="ToggleButton.PasswordBoxRevealButton:checked /template/ Path#PART_GlyphElement_Reveal"> <Style Selector="ToggleButton.passwordBoxRevealButton:checked /template/ Path#PART_GlyphElement_Reveal">
<Setter Property="IsVisible" Value="False" /> <Setter Property="IsVisible" Value="False" />
</Style> </Style>

Loading…
Cancel
Save