示例 1

、ListBox.xaml <UserControl x:Class="Silverlight20.Control.ListBox" xmlns="doc.guandang.net; xmlns:x="doc.guandang.net; <StackPanel HorizontalAlignment="Left"> <!-- SelectionChanged - ListBox中某个对象被选中后所触发的事件 -->

<

ListBox Margin="5" Width="200" Height="100"
SelectionChanged="ListBox_SelectionChanged">
<ListBoxItem Content="ListBoxItem01"/>
<ListBoxItem Content="ListBoxItem02"/>
<ListBoxItem Content="ListBoxItem03"/>
<ListBoxItem Content="ListBoxItem04"/>
<ListBoxItem Content="ListBoxItem05"/>
<ListBoxItem Content="ListBoxItem06"/>
<ListBoxItem Content="ListBoxItem07"/>
<ListBoxItem Content="ListBoxItem08"/>
<ListBoxItem Content="ListBoxItem09"/>
<ListBoxItem Content="ListBoxItem10"/>
</ListBox>
<!--
ListBox中可以包含任何对象
-->
<ListBox Margin="5" Width="200">
<TextBlock Text="TextBlock"/>
<TextBox Text="TextBox"/>
<Button Content="Button"/>
</ListBox>
</StackPanel>
</UserControl>
ListBox.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
w 页码,1/13(W) webabcd - 专注于asp.net, html5, silverlight ASP.NET 从现在开始 一切都不晚 博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: ...
扩展GridView控件(5) - 固定指定 行、指定列(30529) 6. [翻译].net 2.0(c#)下简单的FTP 应用程序(29680) 7. 稳扎稳打 Silverlight 2.0 系列文 章索引...
w 页码,1/12(W) webabcd - 专注于asp.net, html5, silverlight ASP.NET 从现在开始 一切都不晚 博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: ...
w 页码,1/12(W) webabcd - 专注于asp.net, html5, silverlight ASP.NET 从现在开始 一切都不晚 博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: ...
热门文档