Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant resolve existing property #320

Open
Wowhere opened this issue Dec 1, 2024 · 0 comments
Open

Cant resolve existing property #320

Wowhere opened this issue Dec 1, 2024 · 0 comments

Comments

@Wowhere
Copy link

Wowhere commented Dec 1, 2024

Error "Unable to resolve property or method of name 'Status' on type 'simpleserver.ViewModels.HttpServerRunner'"

View code:

<Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="using:simpleserver.ViewModels" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="using:simpleserver.Models" xmlns:local="using:simpleserver.Converters" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="simpleserver.Views.MainWindow" x:CompileBindings="True" x:DataType="vm:MainWindowViewModel" Icon="/Assets/avalonia-logo.ico" WindowStartupLocation="CenterScreen" ExtendClientAreaToDecorationsHint="True" ExtendClientAreaTitleBarHeightHint="-1" > <Window.Styles> </Window.Styles> <Window.Resources> <local:TextConverter x:Key="TextConverter"/> </Window.Resources> <Border BorderThickness="1.5" BorderBrush="#D2B1A38E" IsVisible="True"> <StackPanel> <Label Margin="10,5,10,0" BorderBrush="White">Simple Servers</Label> <Button Background="BlueViolet" Margin="10,10,10,10" Content="Add Server" Command="{Binding AddServerCommand}"></Button> <TreeDataGrid Source="{Binding ServerGridData}" HorizontalAlignment="Stretch" BorderThickness="2" BorderBrush="Gray" CanUserResizeColumns="True"> <TreeDataGrid.Resources> <DataTemplate x:CompileBindings="True" x:Key="statusText" x:DataType="vm:HttpServerRunner"> <TextBox Text="{Binding Status}"></TextBox> </DataTemplate> </TreeDataGrid.Resources> </TreeDataGrid> </StackPanel> </Border> </Window>

изображение

Why avalonia cant resolve existing property? "x:Datatype" and "DataType" results are the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant