XAML/ComputerInfo.xaml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    WindowStyle="None"
    ResizeMode="NoResize"
    Background="Transparent"
>
    <Grid Margin="10">
        <Border BorderBrush="#333333" BorderThickness="1" Background="#333333" Grid.Column="1"
                CornerRadius="10" VerticalAlignment="Center"
                HorizontalAlignment="Center">
            <Grid Margin="10">
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock DataContext="{Binding CurrentValue}" Text="{Binding CsName}" TextWrapping="Wrap" Margin="5" FontSize="25" Foreground="#28bf37" FontFamily="Consolas"/>
                <TextBlock DataContext="{Binding CurrentValue}" Text="{Binding WindowsProductName, StringFormat=Operating System: {0}}" TextWrapping="Wrap" Margin="5" FontSize="15" Foreground="#28bf37" FontFamily="Consolas" Grid.Row="2"/>
                <TextBlock DataContext="{Binding CurrentValue}" Text="{Binding CsSystemFamily, StringFormat=System Family: {0}}" TextWrapping="Wrap" Margin="5" FontSize="15" Foreground="#28bf37" FontFamily="Consolas" Grid.Row="3"/>
                <TextBlock DataContext="{Binding CurrentValue}" Text="{Binding OsLastBootUpTime, StringFormat=Boot Time: {0}}" TextWrapping="Wrap" Margin="5" FontSize="15" Foreground="#28bf37" FontFamily="Consolas" Grid.Row="4"/>
                <TextBlock DataContext="{Binding CurrentValue}" Text="{Binding CsDomain, StringFormat=Domain: {0}}" TextWrapping="Wrap" Margin="5" FontSize="15" Foreground="#28bf37" FontFamily="Consolas" Grid.Row="5"/>
                <TextBlock DataContext="{Binding CurrentValue}" Text="Processors" TextWrapping="Wrap" Margin="5" FontSize="20" Foreground="#28bf37" FontFamily="Consolas" Grid.Row="6"/>
                <ItemsControl DataContext="{Binding CurrentValue}" ItemsSource="{Binding CsProcessors}" Grid.Row="7">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Name}" TextWrapping="Wrap" Margin="5" FontSize="15" Foreground="#28bf37" FontFamily="Consolas"/>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
                <TextBlock DataContext="{Binding CurrentValue}" Text="Networks" TextWrapping="Wrap" Margin="5" FontSize="20" Foreground="#28bf37" FontFamily="Consolas" Grid.Row="8"/>
                <ItemsControl DataContext="{Binding CurrentValue}" ItemsSource="{Binding CsNetworkAdapters}" Grid.Row="9">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Description}" TextWrapping="Wrap" Margin="5" FontSize="15" Foreground="#28bf37" FontFamily="Consolas"/>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </Grid>
        </Border>
    </Grid>
</Window>