Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Files/Views/Pages/Properties.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public sealed partial class Properties : Page
private static ApplicationViewTitleBar TitleBar;

private CancellationTokenSource tokenSource = new CancellationTokenSource();
private ContentDialog propertiesDialog;

private object navParameter;

Expand All @@ -34,6 +35,7 @@ public sealed partial class Properties : Page
public Properties()
{
InitializeComponent();
propertiesDialog = Interaction.FindParent<ContentDialog>(this);
}

protected override void OnNavigatedTo(NavigationEventArgs e)
Expand Down Expand Up @@ -61,7 +63,6 @@ private async void Properties_Loaded(object sender, RoutedEventArgs e)
}
else
{
var propertiesDialog = Interaction.FindParent<ContentDialog>(this);
propertiesDialog.Closed += PropertiesDialog_Closed;
}
}
Expand Down Expand Up @@ -123,6 +124,7 @@ private void PropertiesDialog_Closed(ContentDialog sender, ContentDialogClosedEv
tokenSource.Dispose();
tokenSource = null;
}
propertiesDialog.Hide();
}

private void Properties_Unloaded(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -173,7 +175,6 @@ private async void OKButton_Click(object sender, RoutedEventArgs e)
}
else
{
var propertiesDialog = Interaction.FindParent<ContentDialog>(this);
propertiesDialog.Hide();
}
}
Expand All @@ -186,7 +187,6 @@ private async void CancelButton_Click(object sender, RoutedEventArgs e)
}
else
{
var propertiesDialog = Interaction.FindParent<ContentDialog>(this);
propertiesDialog.Hide();
}
}
Expand All @@ -201,7 +201,6 @@ private async void Page_KeyDown(object sender, KeyRoutedEventArgs e)
}
else
{
var propertiesDialog = Interaction.FindParent<ContentDialog>(this);
propertiesDialog.Hide();
}
}
Expand Down