-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use Microsoft.VisualStudio.Shell.14.0 for compatibility * fix(ui): use brushkey to support themes fix #15 * proper Microsoft.VisualStudio.CoreUtility version
- Loading branch information
Showing
9 changed files
with
127 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
<UserControl x:Class="vs_commitizen.vs2015.Controls.TextBoxWithHint" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:vs_commitizen.vs2015.Controls" | ||
mc:Ignorable="d" > | ||
xmlns:platformUi="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0" | ||
mc:Ignorable="d"> | ||
<UserControl.Resources> | ||
<BooleanToVisibilityConverter x:Key="MyBoolToVisibilityConverter" /> | ||
</UserControl.Resources> | ||
<Grid Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> | ||
<Grid Background="{DynamicResource {x:Static platformUi:CommonControlsColors.TextBoxBackgroundBrushKey}}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> | ||
<!-- overlay with hint text --> | ||
<TextBlock Margin="5,0,5,0" Text="{Binding Path=HintText}" | ||
Foreground="LightSteelBlue" | ||
<TextBlock Margin="5,0,5,0" Text="{Binding Path=HintText}" | ||
Foreground="LightSteelBlue" | ||
Visibility="{Binding ElementName=txtInputBox, Path=Text.IsEmpty, Converter={StaticResource MyBoolToVisibilityConverter}}" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Center" /> | ||
<!-- enter term here --> | ||
<TextBox Name="txtInputBox" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" | ||
AcceptsReturn="{Binding Path=AcceptReturn, RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type UserControl}}}" | ||
Text="{Binding Path=Text, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" | ||
MaxLength="{Binding Path=MaxLength, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" /> | ||
Text="{Binding Path=Text, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" | ||
MaxLength="{Binding Path=MaxLength, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" | ||
Foreground="{DynamicResource {x:Static platformUi:CommonControlsColors.TextBoxTextBrushKey}}" | ||
GotFocus="TxtInputBox_OnGotFocus"> | ||
</TextBox> | ||
</Grid> | ||
</UserControl> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.