Skip to content

Commit

Permalink
Deduplicate ToolTipService settings
Browse files Browse the repository at this point in the history
  • Loading branch information
andreashuber-lawo committed Nov 2, 2015
1 parent 0646ba5 commit f031e6b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Lawo.GlowAnalyzerProxy.Main/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
</Style>
<Style TargetType="TextBox">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
<Setter Property="ToolTipService.ShowDuration" Value="10000"/>
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="True">
<Setter Property="ToolTip">
Expand All @@ -32,6 +34,7 @@
</Style>
<Style TargetType="Button">
<Setter Property="Padding" Value="15,1,15,1"/>
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
</Style>
<Style x:Key="TrippleDotButtonStyle" TargetType="Button">
<Setter Property="Padding" Value="5,0,5,0"/>
Expand Down Expand Up @@ -79,19 +82,18 @@
<TextBox
Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" IsEnabled="{Binding CanEditSettings}"
ToolTip="The port on which this proxy listens for a connection request from the Ember+ consumer."
ToolTipService.ShowOnDisabled="True" Text="{Binding ListeningPort, ValidatesOnDataErrors=True}"/>
Text="{Binding ListeningPort, ValidatesOnDataErrors=True}"/>
<Label Grid.Row="2" Grid.Column="0">Provider Host Name:</Label>
<!-- #region PrimitivePropertyBinding -->
<TextBox
Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" IsEnabled="{Binding CanEditSettings}"
ToolTip="The host name or IP address of the Ember+ provider."
ToolTipService.ShowOnDisabled="True" Text="{Binding ProviderHostName}"/>
ToolTip="The host name or IP address of the Ember+ provider." Text="{Binding ProviderHostName}"/>
<!-- #endregion -->
<Label Grid.Row="4" Grid.Column="0">Provider Port:</Label>
<TextBox
Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2" IsEnabled="{Binding CanEditSettings}"
ToolTip="The port on which the Ember+ provider listens for connection requests."
ToolTipService.ShowOnDisabled="True" Text="{Binding ProviderPort, ValidatesOnDataErrors=True}"/>
Text="{Binding ProviderPort, ValidatesOnDataErrors=True}"/>
<Label Grid.Row="6" Grid.Column="0">Log Folder:</Label>
<TextBox
Grid.Row="6" Grid.Column="2" IsEnabled="{Binding CanEditSettings}"
Expand All @@ -114,18 +116,15 @@
</Grid.ColumnDefinitions>
<!-- #region CallViewModelMethod -->
<Button
Grid.Column="0" IsEnabled="{Binding CanStart}" ToolTip="Start the proxy."
ToolTipService.ShowOnDisabled="True" Content="Start">
Grid.Column="0" IsEnabled="{Binding CanStart}" ToolTip="Start the proxy." Content="Start">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ie:CallMethodAction TargetObject="{Binding}" MethodName="Start"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<!-- #endregion -->
<Button
Grid.Column="2" IsEnabled="{Binding CanStop}" ToolTip="Stop the proxy."
ToolTipService.ShowOnDisabled="True" Content="Stop">
<Button Grid.Column="2" IsEnabled="{Binding CanStop}" ToolTip="Stop the proxy." Content="Stop">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ie:CallMethodAction TargetObject="{Binding}" MethodName="Stop"/>
Expand Down

0 comments on commit f031e6b

Please sign in to comment.