Click here to Skip to main content
15,893,487 members
Articles / Desktop Programming / WPF

C# WPF Log4Net Viewer

Rate me:
Please Sign up or sign in to vote.
4.87/5 (29 votes)
15 Oct 2009CPOL3 min read 222.8K   10.7K   167  
Log4Net XML log viewer
<Window x:Class="LogViewer.About"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="About" Height="500" Width="400"
    Loaded="Window_Loaded">
    <Window.Background>
        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
            <GradientStop Color="#FF5A6DCD" Offset="0"/>
            <GradientStop Color="#FF5A6DCD" Offset="0.4"/>
            <GradientStop Color="#FF293262" Offset="0.6"/>
            <GradientStop Color="#FF293262" Offset="1"/>
        </LinearGradientBrush>
    </Window.Background>
    <Border BorderBrush="Blue" BorderThickness="8" CornerRadius="8">
        <Grid Margin="10,10,10,10">
            <Grid.RowDefinitions>
                <RowDefinition Height="100" />
                <RowDefinition Height="23"/>
                <RowDefinition Height="200*"/>
                <RowDefinition Height="23"/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
                <StackPanel Orientation="Horizontal">
                    <Label Name="labelAssemblyName"
                           Foreground="Orange"
                           FontWeight="Normal"
                           FontSize="24"
                           FontFamily="Calibri"
                           Content="LogViewer"/>
                    <Label Name="labelAssemblyVersion"
                           Foreground="Orange"
                           FontWeight="Normal"
                           FontSize="24"
                           FontFamily="Calibri"
                           Content="2.0"/>
                </StackPanel>
                <Label Name="labelAssembly" Foreground="AntiqueWhite"/>
            </StackPanel>
            <Label Grid.Row="1" Foreground="Orange" Height="23" >Highlights:</Label>
            <RichTextBox 
                Grid.Row="2" 
                Name="RichTextBox1" 
                Background="White" 
                Padding="10,10,10,10" 
                BorderBrush="Blue" 
                BorderThickness="4" 
                Margin="0,0,0,10"
                AcceptsTab="True"
                VerticalScrollBarVisibility="Visible"
                HorizontalScrollBarVisibility="Visible"
                VerticalAlignment="Stretch">
                <FlowDocument IsEnabled="True" PageWidth="600" LineHeight="1">
                    <List Foreground="Blue">
                        <ListItem>
                            <Paragraph>Drag and Drop to open XML log file</Paragraph>
                        </ListItem>
                        <ListItem>
                            <Paragraph>Recent File List</Paragraph>
                        </ListItem>
                        <ListItem>
                            <Paragraph>Column Sorting</Paragraph>
                        </ListItem>
                    </List>
                    
                    <Paragraph>
                        <LineBreak/>
                        Config file setup
                        <LineBreak/>
                        <Italic Foreground="Red" FontSize="10"></Italic>
                    </Paragraph>
                </FlowDocument>
            </RichTextBox>
            <Button Grid.Row="3" Height="23" Name="buttonOK" Width="75" Click="buttonOK_Click" VerticalAlignment="Bottom" HorizontalAlignment="Right">OK</Button>
        </Grid>
    </Border>
</Window>

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 Code Project Open License (CPOL)


Written By
Software Developer (Senior) LEN Associates Inc.
United States United States
Years of software consulting and software development using Microsoft development products such as Microsoft Content Management System, SQL Server Reporting Service, ASP.Net C# VB.Net, HTML and javascript web development, Visual Studio add-on development, C++ MFC/ATL and COM+ development, and ActiveX components.

Comments and Discussions