| 123456789101112131415161718192021222324252627282930313233343536 |
- <Window xmlns="https://github.com/avaloniaui"
- Title="Avalonia Virtualization Test">
- <DockPanel LastChildFill="True" Margin="16">
- <StackPanel DockPanel.Dock="Right"
- Margin="16 0 0 0"
- MinWidth="150"
- Gap="4">
- <TextBox Watermark="Item Count"
- UseFloatingWatermark="True"
- Text="{Binding ItemCount}"/>
- <TextBox Watermark="Extent"
- UseFloatingWatermark="True"
- Text="{Binding #listBox.Scroll.Extent, Mode=OneWay}"/>
- <TextBox Watermark="Offset"
- UseFloatingWatermark="True"
- Text="{Binding #listBox.Scroll.Offset, Mode=OneWay}"/>
- <TextBox Watermark="Viewport"
- UseFloatingWatermark="True"
- Text="{Binding #listBox.Scroll.Viewport, Mode=OneWay}"/>
- <TextBox Watermark="Item to Create"
- UseFloatingWatermark="True"
- Text="{Binding NewItemString}"/>
- <Button Command="{Binding AddItemCommand}">Add Item</Button>
- <Button Command="{Binding RemoveItemCommand}">Remove Item</Button>
- <Button Command="{Binding RecreateCommand}">Recreate</Button>
- </StackPanel>
- <ListBox Name="listBox" Items="{Binding Items}" SelectedItem="{Binding SelectedItem}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Header}"/>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </DockPanel>
- </Window>
|