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
MenuFlyout ItemTepmplate does not gets applied:
With Avalonia 0.10.18 the items are plain shown in UI as ToString()
With Avalonia 11.0.0-preview5 it is complete broken and nothing is shown:
[Binding]Error in binding to 'Avalonia.Controls.MenuFlyout'.'Items': 'Null value in expression '{empty}' at ''.'(MenuFlyout #5560998)
public record class TestItem(string Name, string Info);
public class MainWindowViewModel
{
public MainWindowViewModel()
{
TestItems = new ObservableCollection<TestItem>
{
new TestItem("Hallo", "Hallo Welt"),
new TestItem("Bla", "Hallo Welt"),
new TestItem("Blubb", "Hallo Welt"),
new TestItem("Etwas mehr Text", "Hallo Welt"),
new TestItem("Hallo Ihr da", "Hallo Welt")
};
}
public ObservableCollection<TestItem> TestItems { get; }
Desktop (please complete the following information):
OS: Windows 10 Pro 21H2 64 Bit
The text was updated successfully, but these errors were encountered:
- `MenuItem` is a `HeaderedSelectingItemsControl` not a `HeaderedItemsControl` so need to separate logic for that case when preparing items
- Added `HeaderTemplate` to `HeaderedSelectingItemsControl `
- Tweaked logic for selecting header templates: parent's `ItemTemplate` should be used if set (cross-checked with WPF)
- Update menu templates to bind to menu item's `HeaderTemplate`
Fixes#10626Fixes#10718
- `MenuItem` is a `HeaderedSelectingItemsControl` not a `HeaderedItemsControl` so need to separate logic for that case when preparing items
- Added `HeaderTemplate` to `HeaderedSelectingItemsControl `
- Tweaked logic for selecting header templates: parent's `ItemTemplate` should be used if set (cross-checked with WPF)
- Update menu templates to bind to menu item's `HeaderTemplate`
Fixes#10626Fixes#10718
MenuFlyout ItemTepmplate does not gets applied:
With Avalonia 0.10.18 the items are plain shown in UI as ToString()
With Avalonia 11.0.0-preview5 it is complete broken and nothing is shown:
[Binding]Error in binding to 'Avalonia.Controls.MenuFlyout'.'Items': 'Null value in expression '{empty}' at ''.'(MenuFlyout #5560998)
My Window xaml looks like this:
And the ViewModel looks like this:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: