mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
Hiding panel
This commit is contained in:
@@ -230,13 +230,13 @@
|
||||
Visibility="Collapsed" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- TO DO: Only show OutputPanel when the location was selected / found -->
|
||||
<Grid
|
||||
x:Name="OutputPanel"
|
||||
x:Name="LocationResultPanel"
|
||||
Grid.Row="3"
|
||||
VerticalAlignment="Bottom"
|
||||
ColumnSpacing="16"
|
||||
RowSpacing="12">
|
||||
RowSpacing="12"
|
||||
Visibility="Collapsed">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -278,6 +278,7 @@
|
||||
<!--<TextBlock Grid.Row="3" Text="{x:Bind ViewModel.CityTimesText, Mode=OneWay}" />-->
|
||||
<!-- TO DO: REMOVE, JUST FOR DEBUG -->
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</ContentDialog>
|
||||
</controls:SettingsGroup>
|
||||
|
||||
@@ -157,13 +157,14 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
SyncLoader.IsActive = false;
|
||||
SyncLoader.Visibility = Visibility.Collapsed;
|
||||
LocationDialog.IsPrimaryButtonEnabled = true;
|
||||
LocationResultPanel.Visibility = Visibility.Visible;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SyncButton.IsEnabled = true;
|
||||
SyncLoader.IsActive = false;
|
||||
System.Diagnostics.Debug.WriteLine("Location error: " + ex.Message);
|
||||
LocationDialog.IsPrimaryButtonEnabled = false;
|
||||
VisualStateManager.GoToState(this, "DisabledLocationState", true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,6 +298,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
private async void SyncLocationButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
LocationDialog.IsPrimaryButtonEnabled = false;
|
||||
LocationResultPanel.Visibility = Visibility.Collapsed;
|
||||
await LocationDialog.ShowAsync();
|
||||
}
|
||||
|
||||
@@ -324,6 +326,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
ViewModel.SelectedCity = location;
|
||||
CityAutoSuggestBox.Text = $"{location.City}, {location.Country}";
|
||||
LocationDialog.IsPrimaryButtonEnabled = true;
|
||||
LocationResultPanel.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user