C
C#2mo ago
Noargh

✅ Avalonia Not Found

Im trying to follow a tutorial to get started with Avalonia. Im trying to use a transitioningcontentcontrol to display another page. I believe that I followed the naming conventions correctly but please correct me if I'm wrong.
No description
No description
No description
22 Replies
Noargh
NoarghOP2mo ago
if im missing any information please let me no I forgot to inlude the issue, my apologies; It displays as Not Found in the area where the page should be. Ive tried finding solutions online but none have worked (checking names, rebuilding project, restarting ide)
leowest
leowest2mo ago
can u provide a link of what tutorial ur following that would help and also if u can post the code of Main and Hope pages viewmodel and axaml using the site below to $paste
MODiX
MODiX2mo ago
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
Noargh
NoarghOP2mo ago
BlazeBin - imvevsyhewhj
A tool for sharing your source code with the world!
Noargh
NoarghOP2mo ago
Mamma Mia Dev
YouTube
Avalonia UI - 03 - Sidebar Menu
In this episode we'll see how to create a cool sidebar menu using the SplitView control and Avalonia fluent icons. ► GitHub repo: https://github.com/MammaMiaDev/avaloniaui-the-series ► Avalonia Fluent Icons https://avaloniaui.github.io/icons.html 0:00 Intro 0:58 SplitView design 5:07 SplitView interaction 9:05 Navigation logic 17:56 Icons 23:4...
leowest
leowest2mo ago
doubt this is the issue but should have been private here
public ViewModelBase _currentPage
public ViewModelBase _currentPage
Noargh
NoarghOP2mo ago
ok okoko i just changed it and now its fine could you please briefly explain to me how the hell that worked? wait nevermind im an idiot please proceed
leowest
leowest2mo ago
it worked or not
Noargh
NoarghOP2mo ago
no it didnt sorry
leowest
leowest2mo ago
ok but should be private still because community toolkit creates the counter part public property
Noargh
NoarghOP2mo ago
ok yeah
leowest
leowest2mo ago
do u per chance have github and could u push this app there and link here so I could take a closer look the not found comes from the viewlocator not finding a match but your file names look fine
Noargh
NoarghOP2mo ago
ok i need to make a repo correct?
leowest
leowest2mo ago
yes if ur using visual studio bottom right has a create repo
Noargh
NoarghOP2mo ago
GitHub
GitHub - NoahWeddles/ToDoList: Hey
Hey. Contribute to NoahWeddles/ToDoList development by creating an account on GitHub.
leowest
leowest2mo ago
I see u moved the axaml from root to Views so it doesnt have Views in the namespace apparently let me try yep that's it HomePageView.axaml
<UserControl xmlns="https://github.com/avaloniaui"
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:vm="using:ToDoList.ViewModels"
x:DataType="vm:HomePageViewModel"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="ToDoList.Views.HomePageView">
Welcome to Avalonia!
</UserControl>
<UserControl xmlns="https://github.com/avaloniaui"
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:vm="using:ToDoList.ViewModels"
x:DataType="vm:HomePageViewModel"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="ToDoList.Views.HomePageView">
Welcome to Avalonia!
</UserControl>
and HomePageView.axaml.cs
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace ToDoList.Views;

public partial class HomePageView : UserControl
{
public HomePageView()
{
InitializeComponent();
}
}
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace ToDoList.Views;

public partial class HomePageView : UserControl
{
public HomePageView()
{
InitializeComponent();
}
}
for the HomePageView.axaml and HomePageView.axaml.cs
Noargh
NoarghOP2mo ago
No description
leowest
leowest2mo ago
updated above with the full code and filename changed after doing those changes u need to build
Noargh
NoarghOP2mo ago
No description
Noargh
NoarghOP2mo ago
there we are thanks plenty
leowest
leowest2mo ago
no worries $close
MODiX
MODiX2mo ago
If you have no further questions, please use /close to mark the forum thread as answered

Did you find this page helpful?