private async Task SetCurrentContent() { if (fvwFiles.SelectedItem == null || isLoading) { return; } FileSystemItem file = (FileSystemItem)fvwFiles.SelectedItem; foreach (FileControl control in fileControls.ToArray()) { if (file.Equals(control.DataContext)) { isFirstOpening = false; await control.Activate(); } else { control.Deactivate(); } } }