<hb:NotifyControl x:Class="WPFProject.ResourceUI"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:local="clr-namespace:WPFProject.UI"
|
mc:Ignorable="d"
|
xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
|
xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
d:DesignHeight="450" d:DesignWidth="800">
|
<hb:NotifyControl.Resources>
|
<ResourceDictionary>
|
<ResourceDictionary.MergedDictionaries>
|
<pu:StyleDictionary Includes="Label" />
|
</ResourceDictionary.MergedDictionaries>
|
<Style x:Key="def" TargetType="Label" BasedOn="{StaticResource {x:Static pu:StyleKeys.LabelStyle}}">
|
<Setter Property="pu:LabelHelper.CornerRadius" Value="3"/>
|
<Setter Property="Padding" Value="5,0"/>
|
<Setter Property="Margin" Value="0"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="Foreground" Value="#FFF"/>
|
</Style>
|
</ResourceDictionary>
|
</hb:NotifyControl.Resources>
|
|
<Grid dp:GridHelper.Space="10" dp:GridHelper.SpaceIgnore="ALL">
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
</Grid.ColumnDefinitions>
|
|
<Label Grid.Column="0" Style="{StaticResource def}" x:Name="l1">
|
<TextBlock>
|
<Run Text="{DynamicResource App.CPUUsage}"/>
|
<Run Text="{Binding CpuRate}"/>
|
</TextBlock>
|
</Label>
|
|
<Label Grid.Column="1" Style="{StaticResource def}" x:Name="l2">
|
<TextBlock>
|
<Run Text="{DynamicResource App.RemUsage}"/>
|
<Run Text="{Binding RemRate}"/>
|
</TextBlock>
|
</Label>
|
|
<Label Grid.Column="2" Style="{StaticResource def}" x:Name="l3">
|
<TextBlock Grid.Column="2">
|
<Run Text="{DynamicResource App.TotalCPUUsage}"/>
|
<Run Text="{Binding TotalCpuRate}"/>
|
</TextBlock>
|
</Label>
|
|
<Label Grid.Column="3" Style="{StaticResource def}" x:Name="l4">
|
<TextBlock Grid.Column="3">
|
<Run Text="{DynamicResource App.TotalRemUsage}"/>
|
<Run Text="{Binding TotalRemRate}"/>
|
</TextBlock>
|
</Label>
|
</Grid>
|
</hb:NotifyControl>
|