【WPF】ListBox使用UserContrl作为子控件

来源:互联网 发布:网络悬疑剧两小无猜 编辑:程序博客网 时间:2024/05/02 06:13
<ListBox x:Name="housePlansLB" Margin="0" ItemsSource="{Binding HousePlansList}" Visibility="Collapsed">    <ListBox.ItemTemplate>        <DataTemplate>            <view:HousePlanView /> <!-- 被引入的UserContrl -->        </DataTemplate>    </ListBox.ItemTemplate></ListBox>

重要的参考:

http://stackoverflow.com/questions/7389259/usercontrol-as-datatemplate-inside-listbox

0 0
原创粉丝点击