© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
6 replies
iskander

✅ (Avalonia) i dont get data binding

so im following the official tutorial on how to make a simple to-do app with avalonia. everything is fine and dandy but for whatever reason, trying to add a data context doesnt display my hardcoded values i set!
//MainWindow.axaml
<Window         //boiler plate stuff
        x:DataType="vm:MainWindowViewModel"
        x:Class="testAvaloniaApplication1.Views.MainWindow"
        Title="Iskander's great and grand TO-DO list">
    
    <Views:ToDoListView DataContext="{Binding ToDoList}"/>
    
</Window>
//MainWindow.axaml
<Window         //boiler plate stuff
        x:DataType="vm:MainWindowViewModel"
        x:Class="testAvaloniaApplication1.Views.MainWindow"
        Title="Iskander's great and grand TO-DO list">
    
    <Views:ToDoListView DataContext="{Binding ToDoList}"/>
    
</Window>
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Data binding
C#CC# / help
3y ago
Avalonia Data Trigger
C#CC# / help
16mo ago