Skip to content
Closed
Show file tree
Hide file tree
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
15 changes: 9 additions & 6 deletions MSIXplainer/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@
<!-- All findings -->
<TextBlock Text="All Findings" Style="{StaticResource SubtitleTextBlockStyle}" />

<ListView AutomationProperties.AutomationId="OverviewFindingsList"
<ListView x:Name="OverviewFindingsList"
AutomationProperties.AutomationId="OverviewFindingsList"
ItemsSource="{x:Bind ViewModel.CategoryFindings, Mode=OneWay}"
SelectedItem="{x:Bind ViewModel.SelectedFinding, Mode=TwoWay}"
SelectionMode="Single">
Expand Down Expand Up @@ -510,19 +511,21 @@

<!-- ── FINDING DETAIL PANE (shared, right side) ── -->
<Border Grid.Column="1" Width="380"
Visibility="{x:Bind local:MainPage.NullToCollapsed(ViewModel.SelectedFinding), Mode=OneWay}"
Visibility="{x:Bind local:MainPage.BoolToVisibility(ViewModel.IsFindingDetailVisible), Mode=OneWay}"
Background="{ThemeResource LayerFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1,0,0,0">
<ScrollViewer Padding="20,16,20,24">
<StackPanel Spacing="16">
<!-- Close button -->
<Button AutomationProperties.AutomationId="BtnCloseFinding"
AutomationProperties.Name="Close finding details"
HorizontalAlignment="Right"
Command="{x:Bind ViewModel.DismissSelectedFindingCommand}"
Padding="4" MinWidth="0" MinHeight="0"
Background="Transparent" BorderThickness="0">
<FontIcon Glyph="&#xE711;" FontSize="12" />
Click="OnCloseFindingClick"
Padding="8" MinWidth="32" MinHeight="32"
Background="Transparent" BorderThickness="0"
ToolTipService.ToolTip="Close">
<FontIcon Glyph="&#xE711;" FontSize="14" />
</Button>

<!-- Header -->
Expand Down
16 changes: 16 additions & 0 deletions MSIXplainer/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ private async void NavView_ItemInvoked(NavigationView sender, NavigationViewItem
switch (invoked.Tag)
{
case "apps":
ExitCompareMode();
ExitSettingsMode();
await OpenAppsPaneAsync();
break;

Expand Down Expand Up @@ -195,6 +197,20 @@ private void ViewFinding_Click(object sender, RoutedEventArgs e)
ViewModel.SelectedFinding = finding;
}

/// <summary>
/// Closes the finding detail pane. Clears the OverviewFindingsList selection
/// explicitly first so the TwoWay binding can't immediately re-push the old
/// selection back into ViewModel.SelectedFinding once we null it. Then
/// explicitly toggles IsFindingDetailVisible so the pane collapses even if
/// the SelectedFinding PropertyChanged notification gets coalesced.
/// </summary>
private void OnCloseFindingClick(object sender, RoutedEventArgs e)
{
OverviewFindingsList.SelectedItem = null;
ViewModel.SelectedFinding = null;
ViewModel.IsFindingDetailVisible = false;
}

/// <summary>
/// Copies a manifest property value to the clipboard. Wraps the clipboard
/// call in try/catch so a transient clipboard failure never bubbles up as
Expand Down
16 changes: 16 additions & 0 deletions MSIXplainer/ViewModels/MainPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ public partial class MainPageViewModel : ObservableObject
[ObservableProperty]
public partial ManifestFinding? SelectedFinding { get; set; }

/// <summary>
/// Whether the right-side finding-detail pane should be visible. Tracked as a
/// distinct observable bool (rather than binding visibility to a
/// NullToCollapsed function on SelectedFinding) because the x:Bind function
/// re-evaluation was unreliable in combination with the Overview ListView's
/// TwoWay SelectedItem binding — the pane would stay open after the close
/// button cleared the selection. See issue #15.
/// </summary>
[ObservableProperty]
public partial bool IsFindingDetailVisible { get; set; }

partial void OnSelectedFindingChanged(ManifestFinding? value)
{
IsFindingDetailVisible = value is not null;
}

[ObservableProperty]
public partial string AssessmentMessage { get; set; } = string.Empty;

Expand Down
Loading