Click here to Skip to main content
15,886,110 members
Articles / Programming Languages / XML

Rename Visual Studio Projects and Resolve Related Issues for a Silverlight Application

Rate me:
Please Sign up or sign in to vote.
4.67/5 (3 votes)
22 Apr 2012CPOL11 min read 58.6K   236   15  
A step by step guide showing the details of renaming projects and resolving related issues in a Visual Studio 2010 solution for a Silverlight application.
<UserControl x:Class="StoreApp.Main.Views.ProductList"
             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:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
             mc:Ignorable="d"
             d:DesignHeight="298"
             d:DesignWidth="418"
             >
    <UserControl.Resources>
        <Style x:Key="AlignRight"
               TargetType="sdk:DataGridCell">
            <Setter Property="HorizontalContentAlignment"
                    Value="Right" />
        </Style>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot"
          Style="{StaticResource LayoutRootGridStyle}">
        <Grid Style="{StaticResource NavigationOuterGridStyle}">

            <ScrollViewer x:Name="PageScrollViewer"
                          Style="{StaticResource PageScrollViewerStyle}">
                <StackPanel x:Name="ContentStackPanel"
                            Style="{StaticResource ContentStackPanelStyle}">

                    <TextBlock Text="Product List"
                               Style="{StaticResource HeaderTextStyle}" />


                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Left">
                        <TextBlock Height="22"
                                   HorizontalAlignment="Left"
                                   Name="FilterLabel"
                                   Text="Category" />
                        <ComboBox Height="23"
                                  Margin="6"
                                  Name="categoryCombo"
                                  Width="150"
                                  SelectionChanged="categoryCombo_SelectionChanged" />
                    </StackPanel>

                    <sdk:DataGrid AutoGenerateColumns="False"
                                  Name="dataGrid1"
                                  Margin="6,10,0,0"
                                  MinHeight="100"
                                  Height="Auto"
                                  Width="400"
                                  HorizontalAlignment="Left"                                  
                                  SelectionChanged="dataGrid1_SelectionChanged"                                  
                                  RowEditEnded="dataGrid1_RowEditEnded">
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTextColumn Header="Product ID"
                                                    Binding="{Binding ProductID}" />
                            <sdk:DataGridTextColumn Header="Product Name"
                                                    Binding="{Binding ProductName}" />
                            <sdk:DataGridTextColumn Header="Unit Price"
                                                    Binding="{Binding UnitPrice}"
                                                    CellStyle="{StaticResource AlignRight}" />
                            <sdk:DataGridCheckBoxColumn Header="Out of Stock"
                                                        Width="*"
                                                    Binding="{Binding OutOfStock}" />
                            
                        </sdk:DataGrid.Columns>

                    </sdk:DataGrid>
                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Left"
                                Height="51"
                                Width="288">
                        <Button Content="Add"
                                Height="23"
                                Name="addButton"
                                Width="75"
                                Margin="6"
                                Click="addButton_Click"
                                 />
                        <Button Content="Save"
                                Height="23"
                                Name="saveButton"
                                Width="75"
                                Margin="10"
                                Click="saveButton_Click" />
                        <Button Content="Delete"
                                Height="23"
                                Name="deleteButton"
                                Width="75"
                                Margin="10"
                                Click="deleteButton_Click" />
                    </StackPanel>


                </StackPanel>
            </ScrollViewer>
        </Grid>
    </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
United States United States
Shenwei is a software developer and architect, and has been working on business applications using Microsoft and Oracle technologies since 1996. He obtained Microsoft Certified Systems Engineer (MCSE) in 1998 and Microsoft Certified Solution Developer (MCSD) in 1999. He has experience in ASP.NET, C#, Visual Basic, Windows and Web Services, Silverlight, WPF, JavaScript/AJAX, HTML, SQL Server, and Oracle.

Comments and Discussions