Hello i have problem with Silverlight Navigation application (Using Silverlight 4, .NET 4, MS VisualStudio 2010) I have created Navigation Application with MainPage and two pages - Home adn About. Only modification is in Home page code is bellow.
When i run project i get error "An unknown error was encountered. Please contact your administrator for more information. Error details: Page not found: "/Home" "
What's wrong???? :(
Home.xaml
<navigation:Page xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="Nav.Home"
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:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
Title="Home"
Style="{StaticResource PageStyle}">
<Grid x:Name="LayoutRoot">
<ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}"></ScrollViewer>
<StackPanel x:Name="ContentStackPanel" Background="{x:Null}" Margin="0,0,0,-28">
<Slider Height="16" Name="sliderVariableCount" Width="300" Minimum="2" Maximum="8" SmallChange="1" ValueChanged="sliderVariableCount_ValueChanged" />
<TextBox Height="53" Name="tbDump" Width="432" />
</StackPanel>
</Grid>
</navigation:Page>
Home.xaml.cs
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.Navigation;
using System.Windows.Shapes;
namespace Nav
{
public partial class Home : Page
{
public Home()
{
InitializeCom开发者_如何学编程ponent();
}
// Executes when the user navigates to this page.
protected override void OnNavigatedTo(NavigationEventArgs e)
{
}
private void sliderVariableCount_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
tbDump.Text = sliderVariableCount.Value.ToString();
}
}
}
I believe this is a bug when using Silverlight Navigation application with a SOAP web service in Visual Studio 2010 and Internet Explorer 9. Something to do with Visual Studio Development server Cassini, or so it seems. A workaround is to avoid the Navigation app template.
精彩评论