c058fef7d5
## Summary Fixes the incomplete Simplified Chinese localization shipped in v1.3.0 and prepares v1.3.1. ## Changes - Completed zh-CN localization coverage across the main UI. - Added/updated localization keys for primary views, tray/status text, notifications, and settings. - Kept en-US as the default language. - Updated version metadata to 1.3.1. - Changed installer display name to ThreadPilot while keeping version metadata separate. - Added guarded cleanup for obsolete ThreadPilot 0.1.0-beta uninstall entry. - Improved uninstall cleanup for ThreadPilot AppData, startup task, and HKCU Run entry. - Added localization and packaging metadata tests. ## Validation - dotnet build ThreadPilot_1.sln: passed, 0 warnings - dotnet test ThreadPilot_1.sln: passed, 524 tests ## Safety - No change to elevation behavior. - No change to affinity/process control behavior. - No change to power plan or system tweak behavior. - Normal install/update preserves user settings. - Full uninstall removes ThreadPilot-owned AppData for the uninstalling user.
444 lines
29 KiB
XML
444 lines
29 KiB
XML
<UserControl x:Class="ThreadPilot.Views.PerformanceView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="clr-namespace:ThreadPilot.Converters"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="640"
|
|
d:DesignWidth="1080">
|
|
|
|
<UserControl.Resources>
|
|
<Style x:Key="CardStyle" TargetType="Border">
|
|
<Setter Property="Background" Value="{DynamicResource SurfaceBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="CornerRadius" Value="{DynamicResource StandardCardCornerRadius}"/>
|
|
<Setter Property="Padding" Value="16"/>
|
|
<Setter Property="Margin" Value="0,0,0,12"/>
|
|
</Style>
|
|
|
|
<Style x:Key="TitleTextStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
</Style>
|
|
|
|
<Style x:Key="LabelTextStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
|
|
</Style>
|
|
|
|
<Style x:Key="MetricValueTextStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="22"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
</Style>
|
|
|
|
<Style x:Key="AccentValueTextStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="22"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<Grid Margin="10" Background="{DynamicResource AppBackgroundBrush}">
|
|
<Grid x:Name="MainDashboardContent" Background="{DynamicResource AppBackgroundBrush}">
|
|
<Grid.Style>
|
|
<Style TargetType="Grid">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsPopupVisible}" Value="True">
|
|
<Setter Property="Effect">
|
|
<Setter.Value>
|
|
<BlurEffect Radius="8" KernelType="Gaussian" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Grid.Style>
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
Padding="0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Style="{StaticResource CardStyle}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Text="{DynamicResource PerformanceView_OptionalDiagnostics}" Style="{StaticResource TitleTextStyle}"/>
|
|
<TextBlock Text="{DynamicResource PerformanceView_DiagnosticsDesc1}" Style="{StaticResource LabelTextStyle}" Margin="0,4,0,0"/>
|
|
<TextBlock Text="{DynamicResource PerformanceView_DiagnosticsDesc2}" Style="{StaticResource LabelTextStyle}" Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
|
|
<WrapPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" ItemHeight="32">
|
|
<Button Content="{DynamicResource PerformanceView_StartLive}"
|
|
Command="{Binding StartMonitoringCommand}"
|
|
IsEnabled="{Binding IsMonitoring, Converter={StaticResource InverseBooleanConverter}}"
|
|
MinWidth="128"
|
|
Margin="0,0,8,0"
|
|
ToolTip="{DynamicResource PerformanceView_StartLiveTooltip}"/>
|
|
<Button Content="{DynamicResource PerformanceView_StopLive}"
|
|
Command="{Binding StopMonitoringCommand}"
|
|
IsEnabled="{Binding IsMonitoring}"
|
|
MinWidth="120"
|
|
Margin="0,0,8,0"
|
|
ToolTip="{DynamicResource PerformanceView_StopLiveTooltip}"/>
|
|
<Button Content="{DynamicResource PerformanceView_Refresh}"
|
|
Command="{Binding RefreshMetricsCommand}"
|
|
MinWidth="84"
|
|
Margin="0,0,8,0"
|
|
ToolTip="{DynamicResource PerformanceView_RefreshTooltip}"/>
|
|
<Button Content="{DynamicResource PerformanceView_ClearHistory}"
|
|
MinWidth="104"
|
|
Command="{Binding ClearHistoricalDataCommand}"
|
|
ToolTip="{DynamicResource PerformanceView_ClearHistoryTooltip}"/>
|
|
</WrapPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Grid Grid.Row="1" Margin="0,0,0,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" Style="{StaticResource CardStyle}" Margin="0,0,10,0">
|
|
<StackPanel>
|
|
<TextBlock Text="CPU" Style="{StaticResource LabelTextStyle}"/>
|
|
<TextBlock Text="{Binding CpuUsageText}" Style="{StaticResource AccentValueTextStyle}"/>
|
|
<TextBlock Text="{Binding LastManualRefreshText}" Style="{StaticResource LabelTextStyle}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Grid.Column="1" Style="{StaticResource CardStyle}" Margin="0,0,10,0">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource PerformanceView_Memory}" Style="{StaticResource LabelTextStyle}"/>
|
|
<TextBlock Text="{Binding MemoryUsageText}" Style="{StaticResource MetricValueTextStyle}" FontSize="18"/>
|
|
<TextBlock Text="{Binding MemoryUsagePercentage, StringFormat={}{0:F1}% utilized}" Style="{StaticResource LabelTextStyle}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Grid.Column="2" Style="{StaticResource CardStyle}" Margin="0,0,10,0">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource PerformanceView_ActiveProcesses}" Style="{StaticResource LabelTextStyle}"/>
|
|
<TextBlock Text="{Binding ProcessCountText}" Style="{StaticResource MetricValueTextStyle}"/>
|
|
<TextBlock Text="{Binding MonitoringStateText, StringFormat=Live metrics: {0}}" Style="{StaticResource LabelTextStyle}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Grid.Column="3" Style="{StaticResource CardStyle}" Margin="0">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource PerformanceView_GlobalPowerPlan}" Style="{StaticResource LabelTextStyle}"/>
|
|
<TextBlock Text="{Binding CurrentGlobalPowerPlanText}" Style="{StaticResource MetricValueTextStyle}" FontSize="16"/>
|
|
<TextBlock Text="{Binding LastUpdateTime, StringFormat=Last metric update: {0:HH:mm:ss}}" Style="{StaticResource LabelTextStyle}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2.2*"/>
|
|
<ColumnDefinition Width="1.3*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" Style="{StaticResource CardStyle}" Margin="0,0,10,0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" Margin="0,0,0,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Text="{DynamicResource PerformanceView_ProcessHotspots}" Style="{StaticResource TitleTextStyle}"/>
|
|
<TextBlock Text="{DynamicResource PerformanceView_TopConsumersDesc}" Style="{StaticResource LabelTextStyle}" Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
|
|
<Button Content="{DynamicResource PerformanceView_CreateRuleButton}"
|
|
Command="{Binding CreateRuleFromSelectedProcessCommand}"
|
|
IsEnabled="{Binding CanCreateRuleFromSelectedProcess}"
|
|
Margin="0,0,8,0"
|
|
ToolTip="{DynamicResource PerformanceView_CreateRuleTooltip}"/>
|
|
<Button Content="{DynamicResource PerformanceView_ToggleCore}"
|
|
Command="{Binding ToggleCoreDetailsCommand}"
|
|
Margin="0,0,8,0"/>
|
|
<Button Content="{DynamicResource PerformanceView_ToggleProcess}"
|
|
Command="{Binding ToggleProcessDetailsCommand}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1" Margin="0,0,0,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="2*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0"
|
|
Text="{DynamicResource PerformanceView_Filter}"
|
|
Style="{StaticResource LabelTextStyle}"
|
|
Margin="0,0,8,0"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding ProcessSearchText, UpdateSourceTrigger=PropertyChanged}"
|
|
MinWidth="220"
|
|
Margin="0,0,8,0"
|
|
VerticalContentAlignment="Center"/>
|
|
|
|
<ComboBox Grid.Column="2"
|
|
SelectedValue="{Binding SortMode}"
|
|
SelectedValuePath="Tag"
|
|
Width="110"
|
|
Margin="0,0,8,0">
|
|
<ComboBoxItem Content="CPU" Tag="Cpu"/>
|
|
<ComboBoxItem Content="{DynamicResource PerformanceView_Memory}" Tag="Memory"/>
|
|
<ComboBoxItem Content="{DynamicResource PerformanceView_Name}" Tag="Name"/>
|
|
</ComboBox>
|
|
|
|
<CheckBox Grid.Column="3"
|
|
Content="{DynamicResource PerformanceView_ActionableOnly}"
|
|
IsChecked="{Binding ShowOnlyActionableHotspots}"
|
|
Margin="0,0,8,0"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<CheckBox Grid.Column="4"
|
|
Content="{DynamicResource PerformanceView_RuleBackedOnly}"
|
|
IsChecked="{Binding ShowOnlyRuleBackedHotspots}"
|
|
Margin="0,0,8,0"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<TextBlock Grid.Column="5"
|
|
Text="{Binding MonitoringStatusText}"
|
|
Style="{StaticResource LabelTextStyle}"
|
|
VerticalAlignment="Center"/>
|
|
</Grid>
|
|
|
|
<DataGrid Grid.Row="2"
|
|
ItemsSource="{Binding TopCpuProcesses}"
|
|
SelectedItem="{Binding SelectedHotspotProcess}"
|
|
Visibility="{Binding ShowProcessDetails, Converter={StaticResource BoolToVisibilityConverter}}"
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
IsReadOnly="True"
|
|
HeadersVisibility="Column"
|
|
GridLinesVisibility="Horizontal"
|
|
MinHeight="220"
|
|
MaxHeight="380">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Process}" Binding="{Binding ProcessName}" Width="2*"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_CpuPercent}" Binding="{Binding CpuUsage, StringFormat={}{0:F1}}" Width="90"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Memory}" Binding="{Binding MemoryUsage, Converter={StaticResource BytesToStringConverter}}" Width="110"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Threads}" Binding="{Binding ThreadCount}" Width="80"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Priority}" Binding="{Binding Priority}" Width="110"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Window}" Binding="{Binding WindowTitle}" Width="3*"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
<Border Grid.Row="3"
|
|
Margin="0,10,0,0"
|
|
Padding="10,7"
|
|
CornerRadius="{DynamicResource StandardCardCornerRadius}"
|
|
BorderThickness="1"
|
|
Opacity="{Binding StatusOpacity}"
|
|
Visibility="{Binding StatusMessage, Converter={x:Static converters:StringToVisibilityConverter.Instance}}">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="Background" Value="{DynamicResource SuccessBackgroundBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SuccessBorderBrush}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding HasError}" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource ErrorBackgroundBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ErrorBorderBrush}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBlock Text="{Binding StatusMessage}">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{DynamicResource SuccessTextBrush}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding HasError}" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource ErrorTextBrush}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Grid Grid.Column="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Grid.Row="0" Style="{StaticResource CardStyle}">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource PerformanceView_RuleImpact}" Style="{StaticResource TitleTextStyle}"/>
|
|
<TextBlock Text="{DynamicResource PerformanceView_SelectedHotspot}" Style="{StaticResource LabelTextStyle}" Margin="0,4,0,8"/>
|
|
|
|
<TextBlock Text="{Binding SelectedProcessName}" FontWeight="SemiBold" FontSize="14"/>
|
|
<TextBlock Text="{Binding SelectedProcessExecutable}" Style="{StaticResource LabelTextStyle}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Margin="0,2,0,8"/>
|
|
|
|
<TextBlock Text="{Binding SelectedProcessCpuText}"/>
|
|
<TextBlock Text="{Binding SelectedProcessMemoryText}" Margin="0,2,0,8"/>
|
|
|
|
<TextBlock Text="{Binding SelectedProcessRuleStatus}" FontWeight="SemiBold"/>
|
|
<TextBlock Text="{Binding SelectedProcessRuleSummary}" Style="{StaticResource LabelTextStyle}" TextWrapping="Wrap" Margin="0,2,0,0"/>
|
|
<TextBlock Text="{Binding SelectedProcessLastApplyText}" Style="{StaticResource LabelTextStyle}" Margin="0,8,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Grid.Row="1" Style="{StaticResource CardStyle}">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource PerformanceView_CoreSnapshot}" Style="{StaticResource TitleTextStyle}"/>
|
|
<TextBlock Text="{DynamicResource PerformanceView_CoreSnapshotDesc}" Style="{StaticResource LabelTextStyle}" Margin="0,4,0,8"/>
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
MaxHeight="220"
|
|
Visibility="{Binding ShowCoreDetails, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
<ItemsControl ItemsSource="{Binding CoreUsages}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid Columns="2"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" CornerRadius="{DynamicResource StandardCardCornerRadius}" Padding="8" Margin="0,0,6,6" Background="{DynamicResource SurfaceAltBrush}">
|
|
<StackPanel>
|
|
<TextBlock Text="{Binding CoreId, StringFormat=Core {0}}" FontWeight="SemiBold"/>
|
|
<TextBlock Text="{Binding CoreType}" Style="{StaticResource LabelTextStyle}"/>
|
|
<ProgressBar Value="{Binding Usage}" Maximum="100" Height="5" Margin="0,6,0,2"/>
|
|
<TextBlock Text="{Binding Usage, StringFormat={}{0:F1}%}" Style="{StaticResource LabelTextStyle}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Grid.Row="2" Style="{StaticResource CardStyle}" Margin="0,0,0,0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Text="{DynamicResource PerformanceView_Timeline}" Style="{StaticResource TitleTextStyle}"/>
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,6,0,8">
|
|
<TextBlock Text="{Binding TimelineSampleCountText}" Style="{StaticResource LabelTextStyle}" Margin="0,0,14,0"/>
|
|
<TextBlock Text="{Binding LastTimelineEventText}" Style="{StaticResource LabelTextStyle}"/>
|
|
</StackPanel>
|
|
|
|
<TabControl Grid.Row="2" MinHeight="260">
|
|
<TabItem Header="{DynamicResource PerformanceView_Events}">
|
|
<DataGrid ItemsSource="{Binding TimelineEvents}"
|
|
AutoGenerateColumns="False"
|
|
IsReadOnly="True"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
GridLinesVisibility="Horizontal"
|
|
HeadersVisibility="Column"
|
|
MaxHeight="280"
|
|
MinHeight="220">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Time}" Binding="{Binding Timestamp, StringFormat={}{0:HH:mm:ss}}" Width="80"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Category}" Binding="{Binding Category}" Width="110"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Severity}" Binding="{Binding Severity}" Width="90"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Detail}" Binding="{Binding Detail}" Width="*"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</TabItem>
|
|
<TabItem Header="{DynamicResource PerformanceView_Metrics}">
|
|
<DataGrid ItemsSource="{Binding HistoricalData}"
|
|
AutoGenerateColumns="False"
|
|
IsReadOnly="True"
|
|
CanUserAddRows="False"
|
|
CanUserDeleteRows="False"
|
|
GridLinesVisibility="Horizontal"
|
|
HeadersVisibility="Column"
|
|
MaxHeight="280"
|
|
MinHeight="220">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Time}" Binding="{Binding Timestamp, StringFormat={}{0:HH:mm:ss}}" Width="80"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_CpuPercent}" Binding="{Binding TotalCpuUsage, StringFormat={}{0:F1}}" Width="70"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_MemPercent}" Binding="{Binding MemoryUsagePercentage, StringFormat={}{0:F1}}" Width="70"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_Processes}" Binding="{Binding ActiveProcessCount}" Width="90"/>
|
|
<DataGridTextColumn Header="{DynamicResource PerformanceView_MemoryUsed}" Binding="{Binding TotalMemoryUsage, Converter={StaticResource BytesToStringConverter}}" Width="110"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</TabItem>
|
|
</TabControl>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
|
|
<Grid x:Name="PopupOverlay"
|
|
Visibility="{Binding IsPopupVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
|
|
Panel.ZIndex="100">
|
|
<Grid.InputBindings>
|
|
<MouseBinding MouseAction="LeftClick" Command="{Binding HidePopupCommand}"/>
|
|
</Grid.InputBindings>
|
|
<Border HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
CornerRadius="{DynamicResource StandardCardCornerRadius}"
|
|
Padding="32,24"
|
|
MaxWidth="500"
|
|
BorderBrush="{DynamicResource BorderBrush}"
|
|
BorderThickness="1"
|
|
Background="{DynamicResource CardSurfaceBrush}">
|
|
<StackPanel>
|
|
<TextBlock Text="{Binding PopupTitle}"
|
|
FontSize="18"
|
|
FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextPrimaryBrush}"
|
|
Margin="0,0,0,12"
|
|
TextWrapping="Wrap"/>
|
|
<TextBlock Text="{Binding PopupContent}"
|
|
FontSize="14"
|
|
Foreground="{DynamicResource TextPrimaryBrush}"
|
|
TextWrapping="Wrap"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|