博客统计信息

51cto专家博客
用户名:Eallies
文章数:105
评论数:40
访问量:192405
无忧币:481
博客积分:1711
博客等级:5
注册日期:2008-05-05

我最近发表的评论

背景音乐

我的音乐

00:00 | 00:00

请参阅Scott Guthrie的博客了解详细说明。
  Microsoft Visual Studio 2008 Service Pack 1 Beta:单击此处下载。可下载完VS90sp1-KB945140-ENU.exe后,使用命令行下载完整版本:VS90sp1-KB945140-ENU.exe /createlayout C:\VS90sp1\Layout /passive。
  Microsoft .NET Framework 3.5 Service pack 1 Beta:单击此处下载。可滚动至该网页最下面,直接下载完整版本。
这篇文章是参考微软内部文档重新编写而成,感谢相关内容的各位作者的辛勤劳动!

  其内容介绍如下:

  Topics in this session include IIS 7.0 Administration and Security Integration, Extensibility Opportunities, etc.

  其主题有如下几个方面:

  ※ Become familiar with IIS 7 architecture
  ※ Overview of the different extensibility features in IIS including server runtime, configuration and administration tool
  ※ Be able to add or replace built-in functionality in IIS

  请单击此处..
这篇文章是参考微软内部文档重新编写而成,感谢相关内容的各位作者的辛勤劳动!

  其内容介绍如下:

  This session is to introduce new features about Lifecycle tools in Visual Studio 2008 and Team Foundation Server 2008, including Built-in support for Continuous Integration, "Get latest on checkout", Annotate, Folder Diff, "hot pathing", "baselining", etc.

  其主题有如下几个方面:

  ※ The Business Case for ALM
  ※ What is ALM
  ※ Supporting ALM with Visual Studio Team System
  ..
这篇文章是参考微软内部文档重新编写而成,感谢相关内容的各位作者的辛勤劳动!

  其内容介绍如下:

  This session covers the new design and development features in Visual Studio 2008 for creating rich web applications.
  Topics include the new CSS and HTML design tools, much improved Javascript Intellisense and debugging support, and the new ASP.NET 3.5 controls supporting LINQ and AJAX.
  And then you will learn ASP.NET 3.5 Extensions, which include ASP.NET MVC, ASP.NET Dynamic Data, AD..
 这篇文章是参考微软内部文档重新编写而成,感谢相关内容的各位作者的辛勤劳动!

  其内容介绍如下:

  In this session, you'll learn how to use ASP.NET AJAX to build a richer, more responsive user experience.
  Topics include partial rendering, web services, structured scripting.

  请单击此处下载该文档。
 这篇文章是参考微软内部文档重新编写而成,感谢相关内容的各位作者的辛勤劳动!

  其内容介绍如下:

  There are numerous enhancements included in the .NET Framework 3.5 ranging from improved support for logging events to the new event log in Windows Vista and Windows Server 2008 to new support for building and hosting add-ins with the new CLR Add-in framework.
  This session will cover some of the key new features of the .NET Framework 3.5 base class libraries.

  其主题有如下几个方面:..
这篇文章是参考微软内部文档重新编写而成,感谢相关内容的各位作者的辛勤劳动!

  其内容介绍如下:

  During this brief session, you will learn about some of the key new language enhancements that are provided as part of the C# 3.0 and Visual Basic 9 language that are included with Visual Studio 2008.

  其主题有如下几个方面:

  ※ Auto-Implemented Properties
  ※ Local Variable Type Inference
  ※ Object Initializers
  ※ Collection Initializers
  ※ Anonymous Types
  ※ Query..
这篇文章是参考微软内部文档重新编写而成,感谢相关内容的各位作者的辛勤劳动!

  其内容介绍如下:

  One of the most common forms of data used in applications today continues to be relational data that is stored in various database systems such as Microsoft SQL Server.
  In this session you will learn about the flavors of LINQ that are designed to access relational data including LINQ to SQL, LINQ to Datasets, and LINQ to Entities.
  And then you will learn an efficient, repeatable way t..
 这篇文章是参考微软内部文档重新编写而成,感谢相关内容的各位作者的辛勤劳动!

  其内容介绍如下:

  Language Integrated Query (LINQ) provides the ability to write query expressions directly within C# or Visual Basic.
  LINQ makes it significantly easier to query and access all types of data.
  During this session you will get an introduction to LINQ and learn about several different flavors of LINQ including LINQ to Objects and LINQ to XML.

  请单击此处下载该文档。
需要事先说明的是:该方案采用了反射技术,效率方面可能存在一些问题,如果数据量太大,建议分页显示。
  这里,笔者定义了两个私有变量,分别用于保存每行一样和每行不一样的数据:


    1 private Dictionary<int, IList> _ComboBoxDataContexts = new Dictionary<int, IList>();
    2 private Dictionary<int, Dictionary<int, IList>> _ComboBoxDataContextDictionaries = new Dictionary<int, Dictionary<int, IList>>();  在客..
为解决这个问题,我们可以定义一个私有变量用于保存已勾选的值。然后注册一个CheckBox.CheckedEvent事件,一个CheckBox.UncheckedEvent事件,并在相应的RoutedEventHandler指定的方法中添加或者移除当前勾选的值。
  现在剩下的麻烦事情就是为各行中的CheckBox控件设置IsChecked属性了。我们在前面的文章中已经介绍过了如何找到一个控件,但在这里,我们却发现总是报错,提示this.ItemContainerGenerator.ContainerFromItem(item)为空。
  这是因为在Binding方法执行完之前,该控件的VisualTree还没有来得及生成。为了等待VisualTr..
为什么这些Index很难取得呢?这是因为ListView控件的RoutedEventArgs中的信息太少了,而且这个控件又支持Column的直接拖动重排,以及数据的排序,这就导致行、列的Index有原始和当前值两个版本。
  在这几个Index中,又尤其以SourceColumnIndex最难取得。由于本程序的DataTemplate都是以XamlReader.Load的方式实现的,如下:


    1 string content = string.Format("<common:DataGridButton Name=\"Button{0}\" ColumnIndex=\"{1}\" Content=\"{2}\" Value=\"{{Binding Path={3}}}\" />", i.ToSt..
为了方便读者学习,请单击这里下载源代码。
  首先,我们来看一下使用这个控件后的效果图:

  我们再来看看实现这个控件的XAML代码:


    1 <common:DataGrid Name="grdDataGrid" ItemsSource="{Binding}" CheckBoxChecked="grdDataGrid_CheckBoxChecked" ButtonClick="grdDataGrid_ButtonClick" ComboBoxSelectionChanged="grdDataGrid_ComboBoxSelectionChanged">
    2     <ListView.View>
    3         <GridView>
    4             <common:DataGridColumn Header="First Name" ColumnType="TextBlock" TextBlockTextPath="LastName" ButtonValuePath="ID" />
    5             <common:DataGridColumn Header="Last Name" ColumnType="ComboBox" ComboBoxTextPath="LastName" ComboBoxDisplayMemberPath="LastName" ComboBoxSelectedValuePath="ID" HasDifferentDataContext="True" SortPropertyName="LastName" />
    6             <common:DataGridColumn Header="ID" ColumnType="CheckBox" CheckBoxValuePath="ID" SortPropertyName="ID" Width="50" />
    7             <common:DataGridColumn Header="Date of Birth" TextBlockTextPath="DateOfBirth" TextBlockTextAlignment="Right" SortPropertyName="DateOfBirth" IsDefaultSortColumn="True" />
    8         </GridView>
    9     </ListView.View>
   10 </common:DataGrid>  我们可以看到,使用这个控件跟普通的ListView控件没有太多的区别。我们只需要在DataGridColumn中指定ColumnType为Button、CheckBox、ComboBox、TextBox等,默认为TextBlock,然后对应该类型设定相应的属性即可。而相关的排序、DataTemplate等功能则已经完全封装了。另外,普通的ListView控件的RoutedEventArgs中的信息太少,而取得SourceRowIndex、SourceColumnIndex、CurrentRowIndex、CurrentColumnIndex等则又很难实现,且非常重要,所以笔者也实现了自己的RoutedEventArgs,提供上述各种Index,方便大家在该控件的事件中直接使用。
  下面的几篇文章我将对该控件中的各个重要方面进行一一讲解。[/img]..
为了方便大家学习,请单击此处下载该程序的代码。
  这次Themes\CheckListBox.xaml的内容相当简单:


    1 <ResourceDictionary
    2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    4    xmlns:local="clr-namespace:Eallies.OA.UI.Controls.Common">
    ..
创建CustomControl的步骤我就不再累述,不清楚的请参考综合应用WPF/WCF/WF/LINQ之三:采用用代码创建的方式实现CheckListBox的CustomControl

  为了方便大家学习,请单击此处下载该程序的代码。
  这次Themes\SortableListView.xaml的内容为:
    1 <ResourceDictionary
    2    xmlns="[url]http://schemas.microsoft.com/winfx/2006/xaml/presentation[/url]"
    3    xmlns:x="[url]http://schemas.microsoft.com/winfx/2006/xaml[/ur..



正文



  经过近两个星期的努力,本网站2.0版发布!再次欢迎各位朋友们给予批评指正!
  本版本的最大改动是给大家提供了一个自己发表文章的平台——公共论坛。从现在开始,大家可以在论坛中发表文章和问题了!
《使用.net 2.0开发多层架构的系统》系列文章将以本网站为例子,逐步剖析使用.net 2.0开发多层架构的系统的方法。
  本系列文章将讲解多层的、面对对象的开发过程中的设计到的各项知识。涉及Model层、DAL层、BLL层,以及界面层、控件等的开发。
  因为众所周知的原因,一个系统是否应该按照多层模式开发,这在业界已经成为公认的争论焦点。这里笔者需要提醒的是,笔者支持采用多层模式开发系统,但笔者发表该系列文章的原因并不是为了再一次挑起这个争论,而是希望给想学多层模式开发的朋友们一个例子。因此希望朋友们不要对该系列..
经过近两天的努力,本网站3.0版发布!再次欢迎各位朋友们给予批评指正!
  本版本的最大改动是将程序改成SQL Server版的。
  为了让大家有更好的访问环境,我已经升级了主机,并且该主机支持SQL Server,相信从今以后,大家访问起来会快得多了!
  感谢大家的对本网站的长期关怀!



摘要



  下载地址:[url]http://www.microsoft.com/downloads/details.aspx?FamilyID=2e6e5a9c-ebf6-4f7f-8467-f4de6bd6b831&DisplayLang=en[/url]。



正文



  值得注意的是:下载需要注册,如果您已经有MSN帐户,就比较容易了。
  该消息最早(我所知道)来源于Kaneboy的博客:[url]http://blog.joycode.com/k[/url]aneboy。
 (本文要感谢Microsoft公司的Neil Ni的帮助。)
  其实这个是Microsoft在设计上的一个考虑。由于这些界面元素主要目的是呈现(对我这个控件来说,取值通过属性CheckedValues,如果您试图遍历这些子控件,可能会发现一些子控件甚至都没有加入Visual Tree),如果ListBox里面Item很多的话,一下子都拿出来就可能会影响性能。
  如果您一定需要让所有Item都工作顺利,且不介意性能上面的些许损失的话,那么请您为该控件加上VirtualizingStackPanel.IsVirtualizing="False"这个属性。这样一来,就能顺利解决这个问题了。


 &..
 <<   1   2   3   4   5   >>   页数 ( 1/6 )

公告