Skip to content

Commit

Permalink
use the string converter rather than a bool value duh
Browse files Browse the repository at this point in the history
  • Loading branch information
artehe committed May 8, 2024
1 parent ac90c88 commit fca195f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions SIT.Manager/ViewModels/Settings/EftViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ public partial class EftViewModel : SettingsViewModelBase
[ObservableProperty]
private string _sitEftInstallPath;

[ObservableProperty]
private bool _showEftInstallPathMissing;

public IAsyncRelayCommand ChangeInstallLocationCommand { get; }

public EftViewModel(IBarNotificationService barNotificationService,
Expand Down Expand Up @@ -77,6 +74,5 @@ private async Task ChangeInstallLocation()
protected override void OnActivated()
{
base.OnActivated();
ShowEftInstallPathMissing = string.IsNullOrEmpty(SitEftInstallPath);
}
}
4 changes: 2 additions & 2 deletions SIT.Manager/Views/Settings/EftView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
TextTrimming="CharacterEllipsis"
TextWrapping="WrapWithOverflow"
Text="{Binding SitEftInstallPath}"
IsVisible="{Binding !ShowEftInstallPathMissing}"/>
IsVisible="{Binding SitEftInstallPath, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
<TextBlock Grid.Column="1"
Grid.Row="1"
VerticalAlignment="Center"
TextTrimming="CharacterEllipsis"
TextWrapping="WrapWithOverflow"
Text="{DynamicResource EftViewModelSitEftInstallPathMissing}"
IsVisible="{Binding ShowEftInstallPathMissing}"/>
IsVisible="{Binding SitEftInstallPath}, Converter={x:Static StringConverters.IsNullOrEmpty}}"/>
<Button Grid.Column="2"
Grid.Row="1"
VerticalAlignment="Center"
Expand Down

0 comments on commit fca195f

Please sign in to comment.