-
public sealed partial class MainPage : Page
{
public MainPage() => this
.DataContext(new BindableMainPageModel(), (page, vm) => page
.Background(ThemeResource.Get<Brush>("ApplicationPageBackgroundThemeBrush"))
.Content(new StackPanel()
.VerticalAlignment(VerticalAlignment.Center)
.HorizontalAlignment(HorizontalAlignment.Center)
.Children(
new TextBlock()
.Text("Hello Uno Platform!"),
//new ListView() // ItemTemplateSelector works fine with ListView
new ItemsRepeater() // but it crashes with ItemsRepeater
.ItemsSource(() => vm.Items)
.ItemTemplateSelector<Item>((item, selector) => selector
.Default(() => new TextBlock().Text("def"))
.Case<ItemA>(itemA => new TextBlock().Text("a"))
.Case<ItemB>(itemB => new TextBlock().Text("b"))
)));
} on on
repro: UnoTemplateSelectorApp.zip |
Beta Was this translation helpful? Give feedback.
Answered by
dansiegel
Jul 2, 2024
Replies: 1 comment 1 reply
-
Can you please look into this @dansiegel? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Was actually already looking into this... this has been moved to an issue. @kucint please look for updates there.
#2407