Wpf frame navigation automatically makes the path smaller
public void frameNavigation(string url)
{
string path = "";
if (url == "startup")
{
path = "Pages/Optimizations/startupManagementPage.xaml";
}
else if (url == "unusedM")
{
path = "Pages/Optimizations/unusedMemoryPage.xaml";
}
else
{
return;
}
try
{
framePage.Navigate(new Uri(path, UriKind.Relative));
}
catch (Exception ex)
{
MessageBox.Show($"Navigation error: {ex.Message}");
}
}
This is a method added to my settings window. Now, as seen in the other code, I open the settings window and then call the frameNavigation method.
private void startupAppsManagement_Click(object sender, RoutedEventArgs e)
{
pageWindow pw = new pageWindow();
pw.Show();
pw.frameNavigation("startup");
}
private void unusedMemory_Click(object sender, RoutedEventArgs e)
{
pageWindow pw = new pageWindow();
pw.Show();
pw.frameNavigation("unusedM");
}
Normally, there seems to be no problem, but when I try to perform frame navigation, the entire path becomes smaller as if I applied the strings.lower method during the frame navigation process. Also, there is no problem with the path or url data and I am sure that I wrote the page locations correctly.
I tried many methods and finally defined a string data called path. However, it still makes the url or path smaller
Thanks in advance:visualstudio:0 Replies