ListView - Data template and data source in xaml (instant changes in VS designer)

52 views Asked by At

I have something like this:

          <ListView >
              <Grid >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <SymbolIcon Symbol="SomeExistingSymbol" Margin="0,0,10,0" />
                <TextBlock Grid.Column="1">Some data</TextBlock>
            </Grid>
            <Grid >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <SymbolIcon Symbol="SomeExistingSymbol2" Margin="0,0,10,0" />
                <TextBlock Grid.Column="1">Some data 2</TextBlock>
            </Grid>
            <!--More list view items (grids)-->
         </ListView>

I don't want to copy Grids over and over. I know I can use binding and data templates. But I want to have all data defined in xaml - is that possible?

The reason is that I need to see instant changes of data in VS designer, without building project.

0

There are 0 answers