首页 > 代码库 > GridView

GridView

 <GridView x:Name="gridView" Margin="0 50 0 0">
            <StackPanel>
                <TextBlock x:Name="lblName" TextWrapping="Wrap"  />
                <TextBlock x:Name="lblName2" TextWrapping="Wrap"  />
            </StackPanel>
        </GridView>

 

 

 

 protected override void OnNavigatedTo(NavigationEventArgs e)
        {
           // List<string> str = new List<string>();
           
            for (int i=0;i<1000;i++)
            {
                // str.Add(i.ToString());
                if (i % 2 == 0)
                {
                    lblName.Text += i.ToString();
                    lblName.Text += Environment.NewLine;
              
                }
                else
                {
                    lblName2.Text += i.ToString();
                    lblName.Text += Environment.NewLine;
                }
            }

        }

 

GridView