08 2011 档案

Creating a File Explorer for Isolated Storage
摘要:In this example, you will create a file explorer that will allow a user to navigate through an applition's virtual storage within SL's isolated storage. The file explorer will allow users to view, modify, and create new file within the given directories. Keep in mond that a SL applicatoin ha 阅读全文

posted @ 2011-08-16 17:15 cjerych 阅读(217) 评论(0) 推荐(0)

Passing data to Navigation Pages
摘要:1. Begin by opening the project NavAppFromScratch you were working on in the previous section.2. Open the xaml for View1.xmal and modify the source to include a ComboBox under the Button: <Combobox Padding="10" Margin="10" x:Name="Color" Width="100"> < 阅读全文

posted @ 2011-08-16 13:47 cjerych 阅读(215) 评论(0) 推荐(0)

Using the NavigationService Object in SL4.0
摘要:1 Begin by opening the project NavAppFromScratch you just completed in previous session.2. open the xmal file for View1.xaml and modify the source to include a button under the TextBlock.<Grid x:Name="LayoutRoot"> <StackPanel> <TextBlock Text = "View 1" FontSize=&q 阅读全文

posted @ 2011-08-16 13:32 cjerych 阅读(272) 评论(0) 推荐(0)

Creating a Silverlight Navigation Application
摘要:This exercise demonstrates creating a Sl application with navigation support from scratch using the navigation framework. In the exercise, you will build a simple application that will contain two HyperLinkButton and a Frame. Clicking the links will load one of two pages into the Frame. Let's ge 阅读全文

posted @ 2011-08-16 10:41 cjerych 阅读(448) 评论(0) 推荐(0)

Using the Modal Child WIndow in SL 4.0
摘要:In this exercise, you will create a simple registration form that accepts a first and last name. When someone presses the button to register, a modal window will appear with a terms and conditions notice that users must agree to before proceeding. You won't fully code the registration form, you& 阅读全文

posted @ 2011-08-15 16:41 cjerych 阅读(344) 评论(0) 推荐(0)

Working with the Accordion Control in Silverlight 4.0
摘要:In this example we will use the Accordion control to display a list of books, grouped by category.1. Create a new SL application in VS 2010 called AccordionControl. Allow VS to create a web applition project to host the application.2. With the MainPage.Xaml file selected, position the cursor in the 阅读全文

posted @ 2011-08-15 15:50 cjerych 阅读(423) 评论(0) 推荐(0)

Building a ListBox with custom content in Silverlight 4.0
摘要:Let's take the same data that displayed poker starting hands from the previous exercise and see what type of cool Listbox you can build with it.1. Start out by creating a new Silverlight applicatoin called ListBoxCustom and allow VS to create a hosting web site.2. You will use the same class tha 阅读全文

posted @ 2011-08-15 15:09 cjerych 阅读(372) 评论(0) 推荐(0)

Building a DataGrid with Custom Columns in Silverlight 4.0
摘要:I thought it would be fun to build a DataGrid tha contains a list of starting hads in poker. If you have ever watched poker on TV, you most likely heard the players refer to things like "pocket rockets" and "cowboys". These are smply nicknames they have given to starting hands.1. 阅读全文

posted @ 2011-08-15 14:10 cjerych 阅读(231) 评论(0) 推荐(0)

Building a Simple DataGrid in Silverlight 4.0
摘要:Let's run through a simple DataGrid example.1. create a new silverlight applicaiton in VS 2010. Name the project SimpledataGrid, and have VS create a web application porject for you.2. Add the DataGrid to your application. To do this, simply add the DataGrid to the root Grid in your XAML, and se 阅读全文

posted @ 2011-08-15 13:23 cjerych 阅读(312) 评论(0) 推荐(0)

Element to Element Binding
摘要:To help explain element to element binding in Silverlight, let's build a very simple application. The application will include a buttona a checkbox. When the checkbox is checked, the button is enabled, when the checkbox is unchecked. the button is disabled. Let's get started.1. Create a silv 阅读全文

posted @ 2011-08-15 11:43 cjerych 阅读(232) 评论(0) 推荐(0)

Simple Data Binding in Silverlight 4.0
摘要:To help explain data binding in Silverlight, let's build a very simple application. The application will include a Book object that contains two properties: Title and ISBN. These properties will be bound to two Text Controls. Results as following:1. Create a new Silverlight application in Visual 阅读全文

posted @ 2011-08-15 11:31 cjerych 阅读(320) 评论(0) 推荐(0)

Data Binding in Silverlight 4.0
摘要:Data Binding in SilverlightData binding in Silverlight is accomplished by using the Binding class. The Binding class has two components--the source and the target--and a property that defines the way the two are bound, called the binding mode. The source is the data that is to be bound, the target i 阅读全文

posted @ 2011-08-15 09:51 cjerych 阅读(222) 评论(0) 推荐(0)

C#面试题汇总
摘要:以下列出的所有题目是从网上找的,也有自己修改的地方。1. 如果理解装箱、拆箱操作?运用此操作时对系统性能有什么影响?装箱:从值类型转换为引用类型拆箱:从引用类型转换为值类型创建引用类型会比创建值类型对象的系统开销要大得多,因为它在堆上创建了对象,消耗了内存。而值类型却只是把值放在了线程堆栈上,所以运用此操作时,对系统性能没什么影响。2. XML中的XmlDocument跟XmlReader有什么区别?XmlDocument用于读取、操作和修改XmL文档。XmlReader类也读取XML,但它提供非缓存的只进、只读访问。这意味着使用XmlReader无法编辑属性值或元素内容,或无法插入和移除节点 阅读全文

posted @ 2011-08-14 22:02 cjerych 阅读(1074) 评论(0) 推荐(1)

Session跟Cookie有什么关系?假如IE禁止使用Cookie,那Session还有用吗?
摘要:最近上网搜索了一下面试中可能遇到的一些问题,正好遇到这个,之前也没做过,从网上找了个答案:Session(会话状态)它是asp.net的内置对象,在服务器端存有用户的个人信息,用来唯一表示一名用户。当用户登录服务器的时候,系统会自动合建一个Session,它可暂存用户的首选项如登陆名,时间,状态以及其它实时信息(如购物车信息)。当Session到期或你关闭浏览器,服务器将终止Session。Cookie(网上信息数据块)它是asp.net内置对象request和response中的集合。它在在于你机器上的一个文件夹里,每个有唯一的名字标识。是服务器用于跟踪用户信息、存储用户信息的文件。它可含有 阅读全文

posted @ 2011-08-14 17:47 cjerych 阅读(2349) 评论(1) 推荐(0)

C#String.PadLeft函数,文本对齐以及填补解决方案
摘要:由于很多时候我们需要把数据进行格式化,方便各个系统之间通信和数据交互,因此难免会经常让人位数不够而进行位数相应数据填充。比如,你希望获取的是7位的2进制数据格式,而2进制数据格式,都是以0,1都为数据信号的,只有1,0两数据格式,刚我说的是7位,相当于如下:1000101格式,如果,我的数据是101三个长度的2进制数据,但我想返回一个新的并且具有固定长度,位数不够填充0的做法。string SourceStr="101";string DestinationStr;DestinationStr=String.PadLeft(7,"0");Console. 阅读全文

posted @ 2011-08-12 14:53 cjerych 阅读(431) 评论(0) 推荐(0)

Working with the RadioButton and CheclBox controls
摘要:The Follow exercise will give you a first look at eh RadioButton and CheckBox controls. You will build a simple survey.1. create a new silverlight application in visual studio and call it CheckBoxRadioButton. allow visual sutdio to create a web application project to host the application.2. in the m 阅读全文

posted @ 2011-08-12 14:51 cjerych 阅读(320) 评论(0) 推荐(0)

Working with the TextBox Control In Silverlight 4.0
摘要:This exercise demostrates the use of the TextBox control in Silverlight by creating a simple application that will request the red,green,and blue values to fill an ellipse with a given color. The resulting application will appear as shown below.Here is the codes.1. In Visual Studio, create a new Sil 阅读全文

posted @ 2011-08-12 14:00 cjerych 阅读(248) 评论(0) 推荐(1)

EXCEL数据导入SQL Server数据库中
摘要:最近测试一个程序,将EXCEL数据(65535行,4列[ModelName,ModelNumber,ModelCost,ModelProductivity])导入到数据库表中(3列[aa,bb,cc]),为了解决时间问题,采用了.Net Framework中的SqlBulkCopy类,经过最后测试,执行操作需要8秒左右即可完成,当然测试的数据是比较简单的。代码如下:private void button1_Click(object sender, EventArgs e) { string connString = "Data Source=XXXX; Initial Catalog 阅读全文

posted @ 2011-08-11 13:37 cjerych 阅读(255) 评论(0) 推荐(0)

导航