Skip to content

CustomDataTemplate w/UserControl does not function #84

Answered by timunie
DBenS asked this question in Q&A
Discussion options

You must be logged in to vote

Now I see. You have a mistake in your namespace for some reason. Maybe due to added PersonView in the wrong location and moved into the correct folder afterwards. Namespaces don't cover that automatically.

In PersonView.axaml.cs

using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

- namespace CustomDataTemplate;
+ namespace CustomDataTemplate.Views;

[ ... ]

In PersonView.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"
-            x:Class="…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@DBenS
Comment options

@timunie
Comment options

Answer selected by DBenS
@DBenS
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #82 on May 16, 2024 08:42.