You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//App.axaml
<Application
x:Class="AvaloniaApplication1.App"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://Semi.Avalonia/Themes/Index.axaml" />
</Application.Styles>
</Application>
//MainViewModel.cs
using System.Collections.ObjectModel;
namespace AvaloniaApplication1.ViewModels;
public class MainViewModel : ViewModelBase
{
public ObservableCollection<DeviceTest> DevInputListTest { get; set; }
public string Greeting => "Welcome to Avalonia!";
public MainViewModel()
{
DevInputListTest = new ObservableCollection<DeviceTest>
{ new DeviceTest { Name = "Device 1" },
new DeviceTest { Name = "Device 2" },
new DeviceTest { Name = "Device 3" }
};
}
}
public class DeviceTest {
public string Name { get; set; }
}
//MainView.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="clr-namespace:AvaloniaApplication1.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AvaloniaApplication1.Views.MainView"
x:DataType="vm:MainViewModel">
<Design.DataContext>
<!-- This only sets the DataContext for the previewer in an IDE,
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
<vm:MainViewModel />
</Design.DataContext>
<Grid>
<Grid.ContextMenu>
<ContextMenu ItemsSource="{Binding DevInputListTest}">
<ContextMenu.ItemTemplate>
<DataTemplate>
<MenuItem Header="{Binding Name}"/>
</DataTemplate>
</ContextMenu.ItemTemplate>
</ContextMenu>
</Grid.ContextMenu>
<TextBlock Text="{Binding Greeting}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</UserControl>
The text was updated successfully, but these errors were encountered:
use semi 11.0.7.3
![image](https://private-user-images.githubusercontent.com/7876327/331846616-b55c672e-c480-4d8d-a757-f34a2ac3bc8a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0NDU2MTMsIm5iZiI6MTcyMjQ0NTMxMywicGF0aCI6Ii83ODc2MzI3LzMzMTg0NjYxNi1iNTVjNjcyZS1jNDgwLTRkOGQtYTc1Ny1mMzRhMmFjM2JjOGEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDczMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MzFUMTcwMTUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTBjZGU5OTU3NzU2NGEyNzVmMmQzNjg4NDc5MGNmOTQ3ZWM1OTYzYzNlNmY5YjFjMzkwZjAwMjJlYjgzYjE3YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.deZ49ciMxdC3Es52krqyZvfkLBPo9GfmE-ah7MtIEqA)
if remove semi
this is my code
The text was updated successfully, but these errors were encountered: