Click here to Skip to main content
15,891,184 members
Articles / Desktop Programming / WPF

MPP Viewer

Rate me:
Please Sign up or sign in to vote.
4.75/5 (13 votes)
15 Jun 2011CPOL3 min read 103.7K   4.1K   41  
MPP Viewer is a simple viewer for Microsoft Project files. I works well with 2000/2003/2007 file formats.
<UserControl x:Class="ProjectViewer.Views.ResourceDetailsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.Resources>
            <Style TargetType="{x:Type TextBox}">
                <Setter Property="IsEnabled" Value="False"></Setter>
                <Setter Property="IsReadOnly" Value="False"></Setter>
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <TabControl Margin="1" Grid.Row="1" Grid.ColumnSpan="2">
            <TabItem Header="General">
                <Grid Margin="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Initials" Margin="1"/>
                    <TextBox Text="{Binding Path=Initials, Mode=OneWay}" Grid.Column="1" Margin="2"/>

                    <TextBlock Text="UniqueId" Grid.Row="1" Margin="1"/>
                    <TextBox Text="{Binding Path=UniqueId, Mode=OneWay}" Grid.Row="1" Grid.Column="1" Margin="2" />

                    <TextBlock Text="Group" Grid.Row="2" Margin="1"/>
                    <TextBox Text="{Binding Path=Group, Mode=OneWay}" Grid.Row="2" Grid.Column="1" Margin="2" />

                    <!--<TextBlock Text="Resource Type" Grid.Row="3" Margin="1"/>
                    <TextBox Text="{Binding Path=ResourceType}" Grid.Row="3" Grid.Column="1" Margin="2" />-->

                    <TextBlock Text="Code" Grid.Row="4" Margin="1"/>
                    <TextBox Text="{Binding Path=Code, Mode=OneWay}" Grid.Row="4" Grid.Column="1" Margin="2" />

                    <TextBlock Text="Material Label" Grid.Row="5" Margin="1"/>
                    <TextBox Text="{Binding Path=MaterialLabel, Mode=OneWay}" Grid.Row="5" Grid.Column="1" Margin="2" />

                    <TextBlock Text="Rate" Grid.Row="6"  Margin="0, 4" FontWeight="Bold"/>

                    <TextBlock Text="Standard Rate" Grid.Row="7" Margin="1"/>
                    <TextBox Text="{Binding Path=StandardRate, Mode=OneWay}" Grid.Row="7" Grid.Column="1" Margin="2"/>

                    <TextBlock Text="Overtime Rate" Grid.Row="8" Margin="1"/>
                    <TextBox Text="{Binding Path=OvertimeRate, Mode=OneWay}" Grid.Row="8" Grid.Column="1" Margin="2"/>

                    <!--<TextBlock Text="Per Use Cost" Grid.Row="9" Margin="1"/>
                    <TextBox Text="{Binding Path=PerUseCost}" Grid.Row="9" Grid.Column="1" Margin="2"/>-->

                </Grid>
            </TabItem>

            <TabItem>
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="..\Images\Notes.ico" HorizontalAlignment="Center" VerticalAlignment="Center" Width="20" Height="20" Margin="2"/>
                        <TextBlock Text="Notes" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </StackPanel>
                </TabItem.Header>
                <Grid >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Notes" Grid.Row="1" Margin="1"/>
                    <TextBox Text="{Binding Path=Notes, Mode=OneWay}" Grid.Row="2" Margin="2" Grid.ColumnSpan="2" VerticalAlignment="Stretch" />

                </Grid>
            </TabItem>
        </TabControl>

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


Written By
Architect
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions