|
Good Day i have a Window in WPF defined like this
<Window x:Class="RVI_Education.Gavigator"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Gavigator" Height="673.2" Width="1304.4">
<Frame Name="FrameWithinGrid" >
</Frame>
</Window>
and im using it as a start up in my app.xaml
<Application x:Class="RVI_Education.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Gavigator.xaml">
<Application.Resources>
</Application.Resources>
</Application>
and on Window loaded event i navigate to another Window
like this
public Gavigator()
{
InitializeComponent();
Loaded += Gavigator_Loaded;
}
void Gavigator_Loaded(object sender, RoutedEventArgs e)
{
FrameWithinGrid.Navigate(new System.Uri("Splash.xaml",UriKind.RelativeOrAbsolute));
}
when i load the Project i get an Error
'RVI_Education.Splash' root element is not valid for navigation.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
The error message indicates that the error is in Splash.xaml , which you haven't posted. I would guess that Splash.xaml is a Window , which won't work:
http://stackoverflow.com/a/7078211/124386[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
There is nothing wrong with the Splash Window , the problem is that im trying to navigate from a Window to a Window.
thank for the link , i will continue with the nasty creation of object and disposing them.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|