-
Hi, I have created a simple app (C# Markup + MVU) that uses public MainPage() => this
.DataContext(new BindableMainPageModel(), (page, vm) => page
.Background(ThemeResource.Get<Brush>("ApplicationPageBackgroundThemeBrush"))
.Content(
new Frame()
.Background(Colors.LightYellow)
.Content(MyRepeater(vm))
)
);
private static ItemsRepeater MyRepeater(BindableMainPageModel vm) =>
new ItemsRepeater()
.ItemsSource(() => vm.Items)
.Layout(new StackLayout().Orientation(Orientation.Horizontal).Spacing(10))
.ItemTemplate<Item>(item
=> new Rectangle()
.Width(50)
.Height(30)
.Stroke(Colors.Black)
.StrokeThickness(1)
.RadiusX(4)
.RadiusY(4)
.Fill(x => x.Binding(() => item.Color))
); internal partial record MainPageModel
{
public IListState<Item> Items => ListState<Item>.Value(this, () =>
[
new Item(){ Color = new SolidColorBrush(Colors.Wheat) },
new Item(){ Color = new SolidColorBrush(Colors.Orange) },
new Item(){ Color = new SolidColorBrush(Colors.Magenta) },
]);
}
public class Item
{
public Brush Color { get; set; } = new SolidColorBrush(Colors.Black);
} This app works as expected when ran on As you can see, on Source code for both uno and winui3 apps: UnoRepeaterApp.zip |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
fyi @dansiegel, @jeromelaban, @kazo0 |
Beta Was this translation helpful? Give feedback.
-
@kucint I'm closing this as I believe this should be resolved by #2404/#2407. Please let me know if you're still having this issue and we can look into more. |
Beta Was this translation helpful? Give feedback.
@kucint I'm closing this as I believe this should be resolved by #2404/#2407. Please let me know if you're still having this issue and we can look into more.