1
votes

I made a simple Silverlight 5 app via VS2010 to track down a larger issue in a Silverlight 4 to Silverlight 5 conversion issue in a Business Application for my organization.

Here is the Client side part of the app:

<UserControl x:Class="SilverlightApplication1.MainPage" 
             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" 
             mc:Ignorable="d" 
             d:DesignHeight="300"  
             d:DesignWidth="400"> 

    <StackPanel> 

        <TextBlock 
                Text="{Binding Path=Rate}" 
                Grid.Column="1" 
                Grid.Row="1" 
                x:Name="xTest" 
                FontSize="12" 
                Margin="166,0,0,44" 
                HorizontalAlignment="Left" 
                Foreground="Black" 
                VerticalAlignment="Bottom"> 
        </TextBlock> 

    </StackPanel> 
</UserControl> 

Codebehind:

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Net; 
using System.Windows; 
using System.Windows.Controls; 
using System.Windows.Documents; 
using System.Windows.Input; 
using System.Windows.Media; 
using System.Windows.Media.Animation; 
using System.Windows.Shapes; 

namespace SilverlightApplication1 
{ 
    public partial class MainPage : UserControl 
    { 
        public MainPage() 
        { 
            InitializeComponent(); 
            Rate = 25; 
        } 

        public int Rate { get; set; } 
    } 
}

Result of running app:

Error 12 The tag 'Binding' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. C:\source\sl5_test_app\SilverlightApplication1\SilverlightApplication1\MainPage.xaml 13 24 SilverlightApplication1

Other information:

If I change...

Text="{Binding Path=Rate}"

to...

Text="25"

...The application runs and displays '25' on the screen.


I have searched all over the net for the cause of this, with no return on investment. There are tons of similar queries out there where 'binding' is substituted for 'XXX' or '[Some_Control]' due to this generic Silverlight exception, but so far nothing has solved the issue.

What is missing here?

Thank you, Aaron

1

1 Answers

0
votes

I ended up blowing away my OS, then installing a fresh version of Windows Server 2008 R2, Visual Studio 2010, and all the related Silverlight pieces.

The Binding error no longer occurs with existing or new Silverlight projects.

-Aaron