少有人走的路

勇哥的工业自动化技术网站

本站视觉相关教程整理贴子,持续更新

2020年勇哥的机器视觉实验项目清单(大纲)

勇哥的免费视频教程清单

勇哥在B站发布的视频清单

wpf的命名空间和数据模板

见下面的xaml代码:

<Window x:Class="ADTVPro.MtvMainWindow"
        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:ADTVPro"
        mc:Ignorable="d"
        Title="MtvMainWindow" Height="450" Width="800">
    <Grid>
        <TabControl>
            <TabItem Header="全部歌曲">
                <Grid Background="#FFE5E5E5">
                    <ListBox x:Name="AllSongsListBox" d:ItemsSource="{d:SampleData ItemCount=5}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Margin="2">
                                    <TextBlock Text="{Binding SongName}" FontWeight="Bold" FontSize="14"/>
                                    <TextBlock Text="{Binding Pinyin}" FontSize="12" Foreground="Gray"/>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </TabItem>
            <TabItem Header="选中的歌曲">
                <Grid Background="#FFE5E5E5">
                    <ListBox d:ItemsSource="{d:SampleData ItemCount=5}"/>
                </Grid>
            </TabItem>
        </TabControl>

    </Grid>
</Window>

创建wpf项目中的 “窗口(wpf)”和“页(wpf)”,有什么区别

image.png

<< 1 >>
«    2026年1月    »
1234
567891011
12131415161718
19202122232425
262728293031
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言
文章归档
网站收藏
友情链接

Powered By Z-BlogPHP 1.7.3

Copyright www.skcircle.com Rights Reserved.

鄂ICP备18008319号


站长QQ:496103864 微信:abc496103864