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.运行结果

相关推荐
czhc11400756633 分钟前
722:零侵入;DBG;
c#
-银雾鸢尾-9 小时前
C#中的StringBuilder相关方法
开发语言·c#
-银雾鸢尾-9 小时前
C#中结构体与类的区别;抽象类与接口的区别
开发语言·c#
心平气和量大福大13 小时前
C#-WPF-Window主窗体
开发语言·c#·wpf
白露与泡影14 小时前
Arthas 实战指南:从方法耗时定位到 JVM 变量热修改
服务器·jvm·c#
EIP低代码平台18 小时前
EIP低代码平台系统-字典功能讲解
低代码·c#·工作流
FuckPatience18 小时前
Telerik UI for WPF 值不能为null。参数名:key
ui·wpf
吉普赛的歌19 小时前
YARP负载均衡配置了多个相同接口导致的报错
c#·yarp
张人玉21 小时前
C# WinForms——工厂管理系统(C# WinForms)
数据库·sqlite·c#·winform
夜莺悠吟1 天前
关于对 C# 中 ImplicitUsings,GlobalUsings 的讨论
c#·.net