Skip to content

Commit 144a2e1

Browse files
committed
Button improved
1 parent 8694e38 commit 144a2e1

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

Source/NETworkManager/Views/Applications/NetworkInterfaceView.xaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,41 @@
254254
</Style>
255255
</StackPanel.Style>
256256
<TextBlock Text="{DynamicResource String_NoEnabledNetworkAdaptersFound}" Style="{StaticResource MessageTextBlock}" Margin="0,0,0,10" />
257-
<Button Content="{DynamicResource String_Button_NetworkConnections}" Command="{Binding OpenNetworkConnectionsCommand}" Style="{StaticResource DefaultButton}" HorizontalAlignment="Center"/>
257+
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
258+
<Button Command="{Binding ReloadNetworkInterfacesCommand}">
259+
<Button.Resources>
260+
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource ImageWithTextButton}">
261+
<Setter Property="IsEnabled" Value="True" />
262+
<Style.Triggers>
263+
<DataTrigger Binding="{Binding IsNetworkInterfaceLoading}" Value="True">
264+
<Setter Property="IsEnabled" Value="False" />
265+
</DataTrigger>
266+
</Style.Triggers>
267+
</Style>
268+
</Button.Resources>
269+
<Button.Content>
270+
<Grid>
271+
<Grid.ColumnDefinitions>
272+
<ColumnDefinition Width="Auto" />
273+
<ColumnDefinition Width="*" />
274+
</Grid.ColumnDefinitions>
275+
<Rectangle Width="20" Height="20" Margin="10,5,0,5">
276+
<Rectangle.Resources>
277+
<VisualBrush x:Key="VisualControlPlay" Stretch="Uniform" Visual="{IconPacks:Material Kind=Refresh}"/>
278+
</Rectangle.Resources>
279+
<Rectangle.Style>
280+
<Style TargetType="{x:Type Rectangle}">
281+
<Setter Property="OpacityMask" Value="{StaticResource VisualControlPlay}" />
282+
<Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
283+
</Style>
284+
</Rectangle.Style>
285+
</Rectangle>
286+
<TextBlock Grid.Column="1" Margin="10,5" TextAlignment="Center" Text="{DynamicResource String_Button_Refresh}" />
287+
</Grid>
288+
</Button.Content>
289+
</Button>
290+
<Button Content="{DynamicResource String_Button_NetworkConnections}" Command="{Binding OpenNetworkConnectionsCommand}" Style="{StaticResource DefaultButton}" Margin="10,0,0,0"/>
291+
</StackPanel>
258292
</StackPanel>
259293
</Grid>
260294
</ScrollViewer>

0 commit comments

Comments
 (0)