Cosmos/source/Cosmos.Kernel.LogViewer/Overview/HeapUsageDisplay.xaml

30 lines
1.5 KiB
XML

<UserControl x:Class="Cosmos.Kernel.LogViewer.Overview.HeapUsageDisplay"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Overview="clr-namespace:Cosmos.Kernel.LogViewer.Overview"
Height="51" Width="252">
<UserControl.Resources>
<Overview:LoggedHexNumberToUInt32Converter x:Key="NumberConverter"/>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="169*" />
<ColumnDefinition Width="83*" />
</Grid.ColumnDefinitions>
<Label Grid.ColumnSpan="2" Margin="0,0,69,0">Available Memory:</Label>
<DockPanel Grid.Column="1" LastChildFill="True">
<Label DockPanel.Dock="Right" Content="MB"/>
<Label DockPanel.Dock="Right" Content="{Binding Source={StaticResource LogFile}, XPath=//MM_Init/@Length, Converter={StaticResource NumberConverter}, ConverterParameter=1048576}" FlowDirection="RightToLeft" />
</DockPanel>
<Label Grid.Row="1" Grid.ColumnSpan="2" Margin="0,0,69,0">Used Memory:</Label>
<DockPanel Grid.Column="1" Grid.Row="1" LastChildFill="True">
<Label DockPanel.Dock="Right" Content="MB"/>
<Label DockPanel.Dock="Right" Content="{Binding RelativeSource={RelativeSource Self}, Path=TotalHeapUsage, Converter={StaticResource NumberConverter}, ConverterParameter=1048576}" FlowDirection="RightToLeft" />
</DockPanel>
</Grid>
</UserControl>