silverlight控件:稳扎稳打Silverlight(35) - 3.0Control控件的ChildWindow SaveFileDialog HeaderedItemsControl

稳扎稳打Silverlight(35) - 3.0Control控件的ChildWindow, SaveFileDialog, HeaderedItemsControl, VirtualizingStackPanel(1) - 收藏本文



<navigation:Page x:Class="Silverlight30.Control.VirtualizingStackPanel"
           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"
           mc:Ignorable="d"
           xmlns:navigation="clr-:.Windows.Controls;assembly=.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="VirtualizingStackPanel Page">
    <Grid x:Name="LayoutRoot">
   
        <ListBox x:Name="listBox" VerticalAlignment="Top" HorizontalAlignment="Left"
            Height="50" Width="300">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <!--
                        VirtualizingStackPanel - 虚拟化 StackPanel(即仅生成需要显示 UI 元素当绑定了大量数据而某时仅显示其中小部分时候使用此Control控件则可大幅提高呈现效率)
                        Orientation - 数据排列方式(垂直排列或水平排列)
                    -->
                    <VirtualizingStackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding}" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
       
    </Grid>
</navigation:Page>




  VirtualizingStackPanel.xaml.cs

using ;
using .Collections.Generic;
using .Linq;
using .Net;
using .Windows;
using .Windows.Controls;
using .Windows.Documents;
using .Windows.Input;
using .Windows.Media;
using .Windows.Media.Animation;
using .Windows.Shapes;
using .Windows.Navigation;

Silverlight30.Control
{
    public partial VirtualizingStackPanel : Page
    {
        public VirtualizingStackPanel
        {
            InitializeComponent;

            this.Loaded RoutedEventHandler(VirtualizingStackPanel_Loaded);
        }

        void VirtualizingStackPanel_Loaded(object sender, RoutedEventArgs e)
        {
            List<> items = List<>;
            for ( i = 0; i < 3000; i)
            {
                items.Add(i..PadLeft(10, '0'));
            }

            listBox.ItemsSource = items;
        }
    }
}


  OK



编缉推荐阅读以下文章

  • 稳扎稳打Silverlight(37) - 3.0动画的Easing(缓动效果)
  • 稳扎稳打Silverlight(36) - 3.0Control控件的TreeView, ListBox增强, DataGrid增强, MediaElement增强
  • 稳扎稳打Silverlight(34) - 3.0Control控件的Frame, Page, Label, DescriptionViewer, ValidationSummary
  • 稳扎稳打Silverlight(33) - 3.0Control控件的AutoCompleteBox, DataPager
  • 稳扎稳打Silverlight(32) - 2.0Tip/Trick的MessageBox, Popup……
  • 稳扎稳打Silverlight(31) - 2.0Tip/Trick的加载XAP, 加载XAML, 加载DLL, AppManest.xaml文件介绍说明, 自定义鼠标指针
  • 稳扎稳打Silverlight(30) - 2.0Tip/Trick的Silverlight.js…
  • 稳扎稳打Silverlight(29) - 2.0Tip/Trick的Cookie, 自定义字体, 为传递参数, 自定义鼠标右键, 常用配置参数
  • 稳扎稳打Silverlight 2.0 系列文章索引

页12345678="current">9


最近更新最后刷新时间:2009-08-25 00:43:43

  • 稳扎稳打Silverlight(37) - 3.0动画的Easing(缓动效果)
  • 稳扎稳打Silverlight(36) - 3.0Control控件的TreeView, ListBox增强, DataGrid增强, MediaElement增强
  • 稳扎稳打Silverlight(35) - 3.0Control控件的ChildWindow, SaveFileDialog, HeaderedItemsControl, VirtualizingStackPanel
  • 稳扎稳打Silverlight(34) - 3.0Control控件的Frame, Page, Label, DescriptionViewer, ValidationSummary
  • 稳扎稳打Silverlight(33) - 3.0Control控件的AutoCompleteBox, DataPager
  • 使用Flash Builder 4 beta进行以数据为中心开发
  • 基于Facebook和Flash平台应用架构解析()
  • Flash cs3仿真艺术设计:模糊滤镜应用
  • 基于SoPC目标板Flash编程设计创建及应用
  • Flash AS教程:propertydata问题解决


设计资讯

  • ·如何抓住明天中国消费者?
  • ·揭秘动画大片功夫熊猫是如何炼成
  • ·我国动漫产业发展 4大难题亟待破解
  • ·曹鹏:痛批伪成功学
  • ·曹鹏:新概念成就英语
  • ·曹鹏:英语+编程威力
  • ·遇见曹鹏是学习者幸运
  • ·曹鹏:谈设计和开发
  • ·火星时代原创动画梦想来了
  • ·数字水墙 08年世博会亮相

专题推荐

  • ·Flash 8 入门经典教程
  • ·Flash 8.0 动画编程视频教程
  • ·Flash 8 例子视频教程
  • ·Flash AS 入门到精通教程
  • ·Flash Action Script 3
  • ·Flash 遮罩入门
  • ·Flash 补间动画
  • ·Flash 绘画教程
  • ·Flash 游戏开发例子
  • ·Flash 动画例子教程
  • ·SilverLight 专题
  • ·更多Flash专题>>>



有关我们 | 联系我们 | 版权申明 | 广告服务 | 网站WebSite律师 | 报告 | 免责条款

Copyright © 2002 - 2009 ddvip All Rights Reserved

版权所有



Tags:  silverlight3 silverlight是什么 silverlight silverlight控件

延伸阅读

最新评论

发表评论