UI/ServiceDetailWindow.xaml

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Service Details &amp; Dependencies"
        Height="540" Width="620" MinHeight="440" MinWidth="500"
        WindowStartupLocation="CenterOwner"
        Background="{DynamicResource BrushWindowBg}"
        Foreground="{DynamicResource BrushTextPrimary}"
        FontFamily="Segoe UI" FontSize="12"
        TextOptions.TextFormattingMode="Display"
        UseLayoutRounding="True" SnapsToDevicePixels="True">
 
    <Window.Resources>
        <SolidColorBrush x:Key="BrushWindowBg" Color="#F8FAFC"/>
        <SolidColorBrush x:Key="BrushSurfaceBg" Color="#FFFFFF"/>
        <SolidColorBrush x:Key="BrushHeaderBg" Color="#E2E8F0"/>
        <SolidColorBrush x:Key="BrushBorderSubtle" Color="#CBD5E1"/>
        <SolidColorBrush x:Key="BrushTextPrimary" Color="#0F172A"/>
        <SolidColorBrush x:Key="BrushTextSecondary" Color="#334155"/>
        <SolidColorBrush x:Key="BrushTextMuted" Color="#64748B"/>
        <SolidColorBrush x:Key="BrushRowHover" Color="#220284C7"/>
        <SolidColorBrush x:Key="BrushRowSelectedBg" Color="#006CBE"/>
        <SolidColorBrush x:Key="BrushRowSelectedFg" Color="#FFFFFF"/>
 
        <Style x:Key="EllipsisCellText" TargetType="TextBlock">
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Padding" Value="6,0,4,0"/>
            <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
            <Setter Property="FontWeight" Value="Normal"/>
            <Setter Property="FontSize" Value="12"/>
        </Style>
 
        <Style x:Key="DialogButtonStyle" TargetType="Button">
            <Setter Property="Padding" Value="10,4"/>
            <Setter Property="Margin" Value="0,0,6,0"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Background" Value="{DynamicResource BrushSurfaceBg}"/>
            <Setter Property="Foreground" Value="{DynamicResource BrushTextPrimary}"/>
            <Setter Property="BorderBrush" Value="{DynamicResource BrushBorderSubtle}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Style.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="Opacity" Value="0.4"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
 
    <Grid Margin="14">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
 
        <!-- Header: Service Identity & Live Status -->
        <Border Grid.Row="0" Background="{DynamicResource BrushSurfaceBg}" BorderBrush="{DynamicResource BrushBorderSubtle}" BorderThickness="1" CornerRadius="4" Padding="12,10" Margin="0,0,0,10">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.Column="0" VerticalAlignment="Center">
                    <TextBlock x:Name="TxtDlgDisplayName" Text="Service Display Name" FontSize="15" FontWeight="Bold" Foreground="{DynamicResource BrushTextPrimary}" TextTrimming="CharacterEllipsis"/>
                    <StackPanel Orientation="Horizontal" Margin="0,4,0,0">
                        <TextBlock Text="Service Name: " Foreground="{DynamicResource BrushTextMuted}" FontWeight="SemiBold"/>
                        <TextBlock x:Name="TxtDlgServiceName" Text="ServiceName" Foreground="{DynamicResource BrushTextPrimary}" FontWeight="SemiBold" Margin="0,0,16,0"/>
                        <TextBlock Text="Host PID: " Foreground="{DynamicResource BrushTextMuted}" FontWeight="SemiBold"/>
                        <TextBlock x:Name="TxtDlgPid" Text="0" Foreground="{DynamicResource BrushTextPrimary}" FontWeight="SemiBold"/>
                    </StackPanel>
                </StackPanel>
                <Border x:Name="BadgeDlgStatus" Grid.Column="1" Background="#16A34A" CornerRadius="3" Padding="10,4" VerticalAlignment="Center">
                    <TextBlock x:Name="TxtDlgStatus" Text="RUNNING" FontWeight="Bold" FontSize="11" Foreground="#FFFFFF"/>
                </Border>
            </Grid>
        </Border>
 
        <!-- Main TabControl -->
        <TabControl x:Name="SvcTabControl" Grid.Row="1" Background="{DynamicResource BrushSurfaceBg}" BorderBrush="{DynamicResource BrushBorderSubtle}" Margin="0,0,0,12">
            <!-- Tab 1: General & Configuration -->
            <TabItem Header="General">
                <ScrollViewer VerticalScrollBarVisibility="Auto" Padding="10">
                    <StackPanel>
                        <GroupBox Header="Description" BorderBrush="{DynamicResource BrushBorderSubtle}" Padding="8,6" Margin="0,0,0,10">
                            <TextBox x:Name="TxtDlgDescription" IsReadOnly="True" TextWrapping="Wrap" AcceptsReturn="True"
                                     Height="80" Background="Transparent" Foreground="{DynamicResource BrushTextPrimary}"
                                     BorderThickness="0" VerticalScrollBarVisibility="Auto"/>
                        </GroupBox>
 
                        <GroupBox Header="Configuration &amp; Binary Details" BorderBrush="{DynamicResource BrushBorderSubtle}" Padding="10,8">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="120"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
 
                                <TextBlock Grid.Row="0" Grid.Column="0" Text="Executable Path:" Foreground="{DynamicResource BrushTextMuted}" VerticalAlignment="Center" Margin="0,5"/>
                                <TextBox Grid.Row="0" Grid.Column="1" x:Name="TxtDlgPath" IsReadOnly="True" Padding="5,3" Margin="0,5" BorderBrush="{DynamicResource BrushBorderSubtle}" Background="Transparent" Foreground="{DynamicResource BrushTextPrimary}"/>
 
                                <TextBlock Grid.Row="1" Grid.Column="0" Text="Startup Type:" Foreground="{DynamicResource BrushTextMuted}" VerticalAlignment="Center" Margin="0,5"/>
                                <TextBox Grid.Row="1" Grid.Column="1" x:Name="TxtDlgStartup" IsReadOnly="True" Padding="5,3" Margin="0,5" BorderBrush="{DynamicResource BrushBorderSubtle}" Background="Transparent" Foreground="{DynamicResource BrushTextPrimary}"/>
 
                                <TextBlock Grid.Row="2" Grid.Column="0" Text="Log On As:" Foreground="{DynamicResource BrushTextMuted}" VerticalAlignment="Center" Margin="0,5"/>
                                <TextBox Grid.Row="2" Grid.Column="1" x:Name="TxtDlgAccount" IsReadOnly="True" Padding="5,3" Margin="0,5" BorderBrush="{DynamicResource BrushBorderSubtle}" Background="Transparent" Foreground="{DynamicResource BrushTextPrimary}"/>
 
                                <TextBlock Grid.Row="3" Grid.Column="0" Text="Prerequisites:" Foreground="{DynamicResource BrushTextMuted}" VerticalAlignment="Center" Margin="0,5"/>
                                <TextBox Grid.Row="3" Grid.Column="1" x:Name="TxtDlgDepSummary" IsReadOnly="True" Padding="5,3" Margin="0,5" BorderBrush="{DynamicResource BrushBorderSubtle}" Background="Transparent" Foreground="{DynamicResource BrushTextPrimary}"/>
                            </Grid>
                        </GroupBox>
                    </StackPanel>
                </ScrollViewer>
            </TabItem>
 
            <!-- Tab 2: Dependencies Two-Way Inspector -->
            <TabItem Header="Dependencies">
                <Grid Margin="8">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
 
                    <!-- Prerequisites -->
                    <GroupBox Grid.Row="0" Header="This service depends on the following components (Prerequisites):" BorderBrush="{DynamicResource BrushBorderSubtle}" Padding="4" Margin="0,0,0,6">
                        <DataGrid x:Name="GridDlgPrereqs" AutoGenerateColumns="False" IsReadOnly="True"
                                  HeadersVisibility="Column" GridLinesVisibility="Horizontal"
                                  HorizontalGridLinesBrush="{DynamicResource BrushBorderSubtle}"
                                  Background="{DynamicResource BrushSurfaceBg}"
                                  Foreground="{DynamicResource BrushTextPrimary}"
                                  RowHeaderWidth="0" RowHeight="22" BorderThickness="0">
                            <DataGrid.ColumnHeaderStyle>
                                <Style TargetType="DataGridColumnHeader">
                                    <Setter Property="Background" Value="{DynamicResource BrushHeaderBg}"/>
                                    <Setter Property="Foreground" Value="{DynamicResource BrushTextPrimary}"/>
                                    <Setter Property="FontWeight" Value="SemiBold"/>
                                    <Setter Property="FontSize" Value="11"/>
                                    <Setter Property="Padding" Value="6,2"/>
                                    <Setter Property="BorderBrush" Value="{DynamicResource BrushBorderSubtle}"/>
                                    <Setter Property="BorderThickness" Value="0,0,1,1"/>
                                </Style>
                            </DataGrid.ColumnHeaderStyle>
                            <DataGrid.RowStyle>
                                <Style TargetType="DataGridRow">
                                    <Setter Property="Background" Value="Transparent"/>
                                    <Setter Property="Foreground" Value="{DynamicResource BrushTextPrimary}"/>
                                    <Setter Property="FontWeight" Value="Normal"/>
                                    <Setter Property="FontSize" Value="12"/>
                                    <Style.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter Property="Background" Value="{DynamicResource BrushRowHover}"/>
                                        </Trigger>
                                        <Trigger Property="IsSelected" Value="True">
                                            <Setter Property="Background" Value="{DynamicResource BrushRowSelectedBg}"/>
                                            <Setter Property="Foreground" Value="{DynamicResource BrushRowSelectedFg}"/>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </DataGrid.RowStyle>
                            <DataGrid.CellStyle>
                                <Style TargetType="DataGridCell">
                                    <Setter Property="BorderThickness" Value="0"/>
                                    <Setter Property="Foreground" Value="{DynamicResource BrushTextPrimary}"/>
                                    <Style.Triggers>
                                        <Trigger Property="IsSelected" Value="True">
                                            <Setter Property="Background" Value="{DynamicResource BrushRowSelectedBg}"/>
                                            <Setter Property="Foreground" Value="{DynamicResource BrushRowSelectedFg}"/>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </DataGrid.CellStyle>
                            <DataGrid.Columns>
                                <DataGridTextColumn Header="Service Name" Binding="{Binding Name}" Width="150" ElementStyle="{StaticResource EllipsisCellText}"/>
                                <DataGridTextColumn Header="Display Name" Binding="{Binding DisplayName}" Width="*" ElementStyle="{StaticResource EllipsisCellText}"/>
                                <DataGridTextColumn Header="Status" Binding="{Binding Status}" Width="90" ElementStyle="{StaticResource EllipsisCellText}"/>
                            </DataGrid.Columns>
                        </DataGrid>
                    </GroupBox>
 
                    <GridSplitter Grid.Row="1" Height="3" HorizontalAlignment="Stretch" Background="{DynamicResource BrushBorderSubtle}" Margin="0,2"/>
 
                    <!-- Dependents -->
                    <GroupBox Grid.Row="2" Header="The following components depend on this service (Dependents):" BorderBrush="{DynamicResource BrushBorderSubtle}" Padding="4" Margin="0,6,0,0">
                        <DataGrid x:Name="GridDlgDependents" AutoGenerateColumns="False" IsReadOnly="True"
                                  HeadersVisibility="Column" GridLinesVisibility="Horizontal"
                                  HorizontalGridLinesBrush="{DynamicResource BrushBorderSubtle}"
                                  Background="{DynamicResource BrushSurfaceBg}"
                                  Foreground="{DynamicResource BrushTextPrimary}"
                                  RowHeaderWidth="0" RowHeight="22" BorderThickness="0">
                            <DataGrid.ColumnHeaderStyle>
                                <Style TargetType="DataGridColumnHeader">
                                    <Setter Property="Background" Value="{DynamicResource BrushHeaderBg}"/>
                                    <Setter Property="Foreground" Value="{DynamicResource BrushTextPrimary}"/>
                                    <Setter Property="FontWeight" Value="SemiBold"/>
                                    <Setter Property="FontSize" Value="11"/>
                                    <Setter Property="Padding" Value="6,2"/>
                                    <Setter Property="BorderBrush" Value="{DynamicResource BrushBorderSubtle}"/>
                                    <Setter Property="BorderThickness" Value="0,0,1,1"/>
                                </Style>
                            </DataGrid.ColumnHeaderStyle>
                            <DataGrid.RowStyle>
                                <Style TargetType="DataGridRow">
                                    <Setter Property="Background" Value="Transparent"/>
                                    <Setter Property="Foreground" Value="{DynamicResource BrushTextPrimary}"/>
                                    <Setter Property="FontWeight" Value="Normal"/>
                                    <Setter Property="FontSize" Value="12"/>
                                    <Style.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter Property="Background" Value="{DynamicResource BrushRowHover}"/>
                                        </Trigger>
                                        <Trigger Property="IsSelected" Value="True">
                                            <Setter Property="Background" Value="{DynamicResource BrushRowSelectedBg}"/>
                                            <Setter Property="Foreground" Value="{DynamicResource BrushRowSelectedFg}"/>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </DataGrid.RowStyle>
                            <DataGrid.CellStyle>
                                <Style TargetType="DataGridCell">
                                    <Setter Property="BorderThickness" Value="0"/>
                                    <Setter Property="Foreground" Value="{DynamicResource BrushTextPrimary}"/>
                                    <Style.Triggers>
                                        <Trigger Property="IsSelected" Value="True">
                                            <Setter Property="Background" Value="{DynamicResource BrushRowSelectedBg}"/>
                                            <Setter Property="Foreground" Value="{DynamicResource BrushRowSelectedFg}"/>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </DataGrid.CellStyle>
                            <DataGrid.Columns>
                                <DataGridTextColumn Header="Service Name" Binding="{Binding Name}" Width="150" ElementStyle="{StaticResource EllipsisCellText}"/>
                                <DataGridTextColumn Header="Display Name" Binding="{Binding DisplayName}" Width="*" ElementStyle="{StaticResource EllipsisCellText}"/>
                                <DataGridTextColumn Header="Status" Binding="{Binding Status}" Width="90" ElementStyle="{StaticResource EllipsisCellText}"/>
                            </DataGrid.Columns>
                        </DataGrid>
                    </GroupBox>
                </Grid>
            </TabItem>
        </TabControl>
 
        <!-- Bottom Action Buttons -->
        <DockPanel Grid.Row="2">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                <Button x:Name="BtnDlgStart" Content="Start Service" Style="{StaticResource DialogButtonStyle}"/>
                <Button x:Name="BtnDlgStop" Content="Stop Service" Style="{StaticResource DialogButtonStyle}"/>
                <Button x:Name="BtnDlgRestart" Content="Restart Service" Style="{StaticResource DialogButtonStyle}"/>
            </StackPanel>
            <Button x:Name="BtnDlgClose" DockPanel.Dock="Right" Content="Close" Width="80" Height="26" IsCancel="True" HorizontalAlignment="Right" Cursor="Hand"/>
        </DockPanel>
    </Grid>
</Window>