|
<UserControl x:Class="DiagnosticExplorer.Silverlight.Controls.BagControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ctk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
xmlns:ldsu="clr-namespace:DiagnosticExplorer.Silverlight.Util"
xmlns:lsdc="clr-namespace:DiagnosticExplorer.Silverlight.Controls"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<UserControl.Resources>
<ldsu:MessageConverter x:Key="msgConverter" />
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<ctk:Expander Header="{Binding Name}" IsExpanded="True">
<ctk:Expander.HeaderTemplate>
<DataTemplate>
<TextBlock FontWeight="Bold" FontSize="14" Text="{Binding}" />
</DataTemplate>
</ctk:Expander.HeaderTemplate>
<ItemsControl ItemsSource="{Binding SubBags}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<lsdc:GroupBox Margin="25,0,0,15" Header="{Binding Name}" Style="{StaticResource GroupBoxStyle}">
<lsdc:GroupBox.HeaderTemplate>
<DataTemplate>
<TextBlock Foreground="Green" Text="{Binding}" />
</DataTemplate>
</lsdc:GroupBox.HeaderTemplate>
<ItemsControl ItemsSource="{Binding Props}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<lsdc:UniformGrid Columns="2" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Name}" Margin="10,0,10,0">
<ToolTipService.ToolTip>
<ToolTip>
<TextBlock Text="{Binding Description}" />
</ToolTip>
</ToolTipService.ToolTip>
</TextBlock>
<TextBlock Grid.Column="1" Text="{Binding Value, Converter={StaticResource msgConverter}}" Foreground="Green">
<ToolTipService.ToolTip>
<ToolTip>
<TextBlock Text="{Binding Value}" Foreground="Green" />
</ToolTip>
</ToolTipService.ToolTip>
</TextBlock>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</lsdc:GroupBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ctk:Expander>
</Grid>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a software developer originally from Auckland, New Zealand. I have lived and worked in London since 2005.