fix: add carousel indicator back.
This commit is contained in:
parent
b3737bfee6
commit
b5a9c8f53e
@ -141,7 +141,8 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ItemContainerTheme="{DynamicResource CarouselIndicatorDotListBoxItem}"
|
||||
ItemsSource="{TemplateBinding ItemsSource,
|
||||
ItemsSource="{TemplateBinding ItemCount,
|
||||
Mode=OneWay,
|
||||
Converter={StaticResource ItemsConverter}}"
|
||||
SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
|
||||
<ListBox.ItemsPanel>
|
||||
|
@ -12,9 +12,9 @@ public class ItemToObjectConverter: IValueConverter
|
||||
{
|
||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is ItemCollection list)
|
||||
if (value is int i)
|
||||
{
|
||||
return list.Select(a => new object());
|
||||
return Enumerable.Repeat(new object(), i).ToList();
|
||||
}
|
||||
return new List<object>();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user