Click here to Skip to main content
15,885,366 members
Articles / Desktop Programming / XAML

Diagnostic Explorer

Rate me:
Please Sign up or sign in to vote.
4.93/5 (41 votes)
29 Nov 2010LGPL315 min read 82.2K   1.5K   120  
A .NET library and website which allows developers to expose and view arbitrary diagnostic information about their .NET processes.
<UserControl x:Class="DiagnosticExplorer.Silverlight.Controls.RetroFilter"
    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:sys="clr-namespace:System;assembly=mscorlib"
		xmlns:ldsu="clr-namespace:DiagnosticExplorer.Silverlight.Util"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignHeight="409" d:DesignWidth="311">
	<UserControl.Resources>
		<ldsu:StringFormatConverter x:Key="sfc" />
		<ldsu:DateTimeConverter x:Key="dconvert" />
	</UserControl.Resources>

	<Grid Margin="5">

		<StackPanel Orientation="Vertical" x:Name="pnlMain">

			<TextBlock Margin="0,5,0,0">Max Records</TextBlock>
			<ComboBox x:Name="cboMaxRecords" SelectedItem="{Binding MaxRecords, Mode=TwoWay}" />

			<TextBlock Margin="0,5,0,0">Min Severity</TextBlock>
			<ComboBox SelectedItem="{Binding MinSeverity, Mode=TwoWay}" x:Name="cboSeverity" />

			<TextBlock Margin="0,5,0,0">Start Date</TextBlock>
			<TextBox Text="{Binding StartDate, Mode=TwoWay, Converter={StaticResource dconvert}, ConverterParameter='d MMM yyyy HH:mm'}" />

			<TextBlock Margin="0,5,0,0">End Date</TextBlock>
			<TextBox Text="{Binding EndDate, Mode=TwoWay, Converter={StaticResource dconvert}, ConverterParameter='d MMM yyyy HH:mm'}" />

			<TextBlock Margin="0,5,0,0">Machine</TextBlock>
			<TextBox Text="{Binding Machine, Mode=TwoWay}" />

			<TextBlock Margin="0,5,0,0">Process</TextBlock>
			<TextBox Text="{Binding Process, Mode=TwoWay}" />

			<TextBlock Margin="0,5,0,0">User</TextBlock>
			<TextBox Text="{Binding User, Mode=TwoWay}" />

			<TextBlock Margin="0,5,0,0">Message</TextBlock>
			<TextBox Text="{Binding Message, Mode=TwoWay}" />

			<Grid Margin="0,5,0,0">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="*" />
				</Grid.ColumnDefinitions>
				<Button Grid.Column="0" Click="ResetFilter" HorizontalAlignment="Left"
							IsEnabled="{Binding RefreshEnabled}" Content="Reset" />

				<Button Grid.Column="1" x:Name="btnRefresh"  Click="RefreshClick" HorizontalAlignment="Right"
							IsEnabled="{Binding RefreshEnabled}" Content="Refresh" />
			</Grid>

			<TextBlock Margin="0,25,0,0" Text="{Binding ResultMessage}" />

		</StackPanel>

	</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.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Software Developer
United Kingdom United Kingdom
I am a software developer originally from Auckland, New Zealand. I have lived and worked in London since 2005.

Comments and Discussions