Polish header controls and fix information tab layout issues

This commit is contained in:
Meik
2026-03-05 11:04:53 +01:00
parent 03fc189639
commit c29ca72b2b
5 changed files with 304 additions and 216 deletions

View File

@@ -47,6 +47,7 @@
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="InfoTextBoxStyle"
TargetType="{x:Type TextBox}">
<Setter Property="Foreground"
@@ -58,7 +59,7 @@
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Padding"
Value="8,3" />
Value="8,4" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
@@ -72,10 +73,63 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="InfoRowIconStyle"
TargetType="{x:Type Image}">
<Setter Property="Width"
Value="24" />
<Setter Property="Height"
Value="24" />
<Setter Property="Canvas.Left"
Value="0" />
<Setter Property="Canvas.Top"
Value="0" />
</Style>
<Style x:Key="InfoRowLabelStyle"
TargetType="{x:Type Label}">
<Setter Property="Foreground"
Value="{DynamicResource sectionTitleColor}" />
<Setter Property="FontSize"
Value="16" />
<Setter Property="Canvas.Left"
Value="40" />
<Setter Property="Canvas.Top"
Value="-2" />
</Style>
<Style x:Key="InfoRowValueStyle"
TargetType="{x:Type TextBox}"
BasedOn="{StaticResource InfoTextBoxStyle}">
<Setter Property="Width"
Value="310" />
<Setter Property="Height"
Value="28" />
<Setter Property="FontSize"
Value="15" />
<Setter Property="Canvas.Left"
Value="12" />
<Setter Property="Canvas.Top"
Value="20" />
</Style>
<Style x:Key="InfoRowCopyStyle"
TargetType="{x:Type Image}">
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="Width"
Value="22" />
<Setter Property="Height"
Value="22" />
<Setter Property="Canvas.Left"
Value="325" />
<Setter Property="Canvas.Top"
Value="23" />
</Style>
</UserControl.Resources>
<!--ComputerInformation-->
<Grid x:Name="GridInfo" x:FieldModifier="private"
<Grid x:Name="GridInfo"
x:FieldModifier="private"
Width="500">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100*" />
@@ -83,20 +137,15 @@
<ColumnDefinition Width="185*" />
<ColumnDefinition Width="30*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="6*" />
<RowDefinition Height="7*" />
</Grid.RowDefinitions>
<Canvas x:Name="CanvasInfo"
Grid.Column="1"
Grid.ColumnSpan="2"
Grid.Row="0"
Height="560">
<Image Source="{DynamicResource appbar_information}"
Width="36"
Height="36"
Margin="0,6,0,0"
Width="32"
Height="32"
Canvas.Top="8"
Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}"
Content="{x:Static resx:Resources.information}"
@@ -109,244 +158,175 @@
Canvas.Left="0"
Width="350">
<Canvas Width="350"
Height="54">
Height="50">
<Image Source="{DynamicResource appbar_monitor}"
Height="30"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoComputer_Inline"
x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}"
x:Name="LblComputername"
<Label x:Name="LblComputername"
x:FieldModifier="private"
Content="{x:Static resx:Resources.computername}"
FontSize="16"
Canvas.Top="4"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="24"
FontSize="16"
VerticalAlignment="Center"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtComputername"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.computername}" />
<TextBox x:Name="TxtComputername"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true"
Canvas.Top="26"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyComputer"
<Image x:Name="icoCopyComputer"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="54">
Height="50">
<Image Source="{DynamicResource appbar_network}"
Height="30"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoNetwork_Inline"
x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}"
FontSize="16"
x:Name="LblIpaddress"
<Label x:Name="LblIpaddress"
x:FieldModifier="private"
Content="{x:Static resx:Resources.ipaddress}"
Canvas.Top="4"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="24"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtIpaddress"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.ipaddress}" />
<TextBox x:Name="TxtIpaddress"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true"
Canvas.Top="26"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyNetwork"
<Image x:Name="icoCopyNetwork"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="54"
Height="50"
x:Name="CanvasHostname"
x:FieldModifier="private">
<Image Source="{DynamicResource appbar_remotehost}"
Height="30"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoHost_Inline"
x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}"
x:Name="LblHostname"
<Label x:Name="LblHostname"
x:FieldModifier="private"
Content="{x:Static resx:Resources.Hostname}"
FontSize="16"
Canvas.Top="4"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="24"
FontSize="16"
VerticalAlignment="Center"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtHostname"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.Hostname}" />
<TextBox x:Name="TxtHostname"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true"
Canvas.Top="26"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyHost"
<Image x:Name="icoCopyHost"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="54">
Height="50">
<Image Source="{DynamicResource appbar_people}"
Height="30"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoUser_Inline"
x:FieldModifier="private" />
<Label Foreground="{DynamicResource sectionTitleColor}"
FontSize="16"
x:Name="LblUsername"
<Label x:Name="LblUsername"
x:FieldModifier="private"
Content="{x:Static resx:Resources.username}"
Canvas.Top="4"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="24"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtUsername"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.username}" />
<TextBox x:Name="TxtUsername"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsEnabled="true"
IsReadOnly="true"
Canvas.Top="26"
PreviewMouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyUser"
<Image x:Name="icoCopyUser"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="54">
Height="50">
<Image Source="{DynamicResource appbar_reset}"
Height="30"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoRestart_Inline"
x:FieldModifier="private"
Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}"
FontSize="16"
x:Name="LblLastreboot"
<Label x:Name="LblLastreboot"
x:FieldModifier="private"
Content="{x:Static resx:Resources.lastreboot}"
Canvas.Top="4"
Canvas.Left="40" />
<TextBox Canvas.Left="15"
Width="300"
Height="24"
VerticalAlignment="Center"
FontSize="16"
Style="{StaticResource InfoTextBoxStyle}"
x:Name="TxtLastreboot"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.lastreboot}" />
<TextBox x:Name="TxtLastreboot"
x:FieldModifier="private"
Style="{StaticResource InfoRowValueStyle}"
IsReadOnly="true"
Canvas.Top="26"
MouseDoubleClick="Info_TXT_OnMouseDoubleClick" />
<Image Cursor="Hand"
Source="{DynamicResource appbar_page_copy}"
Height="22"
x:Name="icoCopyRestart"
<Image x:Name="icoCopyRestart"
x:FieldModifier="private"
Style="{StaticResource InfoRowCopyStyle}"
Source="{DynamicResource appbar_page_copy}"
Tag="MAINICO"
Canvas.Left="315"
Canvas.Top="26"
Width="24"
PreviewMouseDown="ClickCopyIcon" />
</Canvas>
<Canvas Width="350"
Height="74">
Height="86">
<Image Source="{DynamicResource appbar_folder_ellipsis}"
Height="30"
Style="{StaticResource InfoRowIconStyle}"
x:Name="icoDrive_Inline"
x:FieldModifier="private"
Tag="MAINICO" />
<Label Foreground="{DynamicResource sectionTitleColor}"
x:Name="LblDrives"
<Label x:Name="LblDrives"
x:FieldModifier="private"
Content="{x:Static resx:Resources.drives}"
FontSize="16"
Canvas.Top="4"
Canvas.Left="40" />
<StackPanel Canvas.Left="15"
Canvas.Top="28"
Style="{StaticResource InfoRowLabelStyle}"
Content="{x:Static resx:Resources.drives}" />
<StackPanel Canvas.Left="8"
Canvas.Top="24"
Orientation="Vertical"
Width="300">
Width="334">
<StackPanel x:Name="StPaDrives"
x:FieldModifier="private"
Width="300"
Width="334"
CanHorizontallyScroll="True"
CanVerticallyScroll="True"
MinHeight="30"
MaxHeight="30"
HorizontalAlignment="Center"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
Orientation="Horizontal" />
<StackPanel x:Name="StPaDrives2"
x:FieldModifier="private"
Width="300"
Width="334"
CanHorizontallyScroll="True"
CanVerticallyScroll="True"
MinHeight="30"
MaxHeight="30"
HorizontalAlignment="Center"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
Orientation="Horizontal" />
</StackPanel>
</Canvas>
<Canvas Width="350"
Height="130">
Height="110">
<Label Content="{x:Static resx:Resources.genReportHeader}"
Foreground="{DynamicResource sectionTitleColor}"
Canvas.Left="58"
Canvas.Top="0"
FontSize="16"
HorizontalAlignment="Center"
VerticalAlignment="Top" />
Width="334"
Canvas.Left="8"
Canvas.Top="0"
HorizontalContentAlignment="Center" />
<Button Foreground="{DynamicResource buttonTextColor}"
HorizontalAlignment="Left"
Style="{StaticResource ButtonStyle}"
Width="250"
Height="38"
Height="36"
x:Name="BtnClientReport"
x:FieldModifier="private"
Content="{x:Static resx:Resources.genReport}"
@@ -355,10 +335,9 @@
Canvas.Left="50"
Canvas.Top="24" />
<Button Foreground="{DynamicResource buttonTextColor}"
HorizontalAlignment="Center"
Style="{StaticResource ButtonStyle}"
Width="250"
Height="38"
Height="36"
x:Name="BtnRemoteSupport"
x:FieldModifier="private"
Tag="LABEL"
@@ -367,13 +346,13 @@
Click="OnRemoteSupportClicked"
Visibility="Visible"
Canvas.Left="50"
Canvas.Top="70" />
Canvas.Top="66" />
<Grid Panel.ZIndex="100"
x:Name="PRGSGrid"
x:FieldModifier="private"
Visibility="Hidden"
Canvas.Left="100"
Canvas.Top="31">
Canvas.Top="29">
<uctrl:CustomProgressBar x:Name="PRGS"
x:FieldModifier="private"
Visibility="Visible"
@@ -386,14 +365,18 @@
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
<Label x:Name="LblCustomerPanelVersion"
x:FieldModifier="private"
FontSize="12"
Canvas.Left="118"
Canvas.Top="112" />
</Canvas>
</StackPanel>
<Label x:Name="LblCustomerPanelVersion"
x:FieldModifier="private"
FontSize="12"
Width="334"
Canvas.Left="8"
Canvas.Top="536"
HorizontalContentAlignment="Center"
Foreground="{DynamicResource subtleTextColor}" />
<Canvas Canvas.Left="150"
Canvas.Top="10"
x:Name="copied"
@@ -418,5 +401,4 @@
</Canvas>
</Canvas>
</Grid>
<!--ComputerInformation-->
</UserControl>