c# wpf template ItemsPanel 简单试验

1.概要

2.代码

<Window x:Class="WpfApp2.Window9"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp2"
        mc:Ignorable="d"
        Title="Window9" Height="450" Width="800">
    <Grid>
        <ListBox>
            <!--ItemsPanel-->
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <!--条目-->
            <TextBlock Text="Allan"/>
            <TextBlock Text="Kevin"/>
            <TextBlock Text="Drew"/>
            <TextBlock Text="Timothy"/>
        </ListBox>
    </Grid>
</Window>

3.运行结果

相关推荐

  1. 简单试验:用Excel进行爬虫

    2024-04-06 06:26:10       24 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-06 06:26:10       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-06 06:26:10       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-06 06:26:10       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-06 06:26:10       18 阅读

热门阅读

  1. Django -- 自动化测试

    2024-04-06 06:26:10       11 阅读
  2. Linux 中 .bashrc、.bash-profile 和 .profile 之间的区别

    2024-04-06 06:26:10       9 阅读
  3. 解决安卓手机系统文件夹看不到的问题

    2024-04-06 06:26:10       15 阅读
  4. 稀碎从零算法笔记Day40-LeetCode:加油站

    2024-04-06 06:26:10       15 阅读
  5. 0基础如何进入IT行业?

    2024-04-06 06:26:10       14 阅读
  6. AI赋能写作:探索设计模式的魅力

    2024-04-06 06:26:10       13 阅读
  7. 位运算 -力扣90. 颠倒二进制位

    2024-04-06 06:26:10       11 阅读
  8. 什么是Ajax?怎么使用?

    2024-04-06 06:26:10       12 阅读
  9. 达梦体系结构:内存架构

    2024-04-06 06:26:10       14 阅读