![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
WPF/SilverLight
文章平均质量分 78
diandian82
这个作者很懒,什么都没留下…
展开
-
Implemented the interface INotifyPropertyChanged can inform UI to update the values.
If you have control bind to Book object and When you update the book object which has implemented the value, the control will update the values on UI accordingly. public class Book : INotifyPrope原创 2009-09-04 10:56:00 · 512 阅读 · 0 评论 -
Call JS function in Silverlight4
JS and Silverlight4原创 2010-06-12 14:01:00 · 1217 阅读 · 0 评论 -
Example on implementing DependencyProperty in User control
Example on implementing DependencyProperty in User control原创 2010-06-13 10:05:00 · 754 阅读 · 0 评论 -
How to attach behavior in code behind (Silverlight 3)
<br />For those of you who would like to add (attach) behavior to control in code behind, there is a simple solution.Adding Behaviors<br />Let's say that we have xaml code like this one:<br /> <br /><TextBox x:Name="TextBoxInvoker" Text="TextBoxControl" >原创 2010-08-10 14:56:00 · 1247 阅读 · 0 评论 -
Example - how to implement INotifyDataErrorInfo
<br />This is for validation,<br /> <br />ViewModel code:<br />using System;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Ink;using System.Windows.Input;using System.Wi原创 2010-09-26 13:19:00 · 688 阅读 · 0 评论 -
给WCF增加提交数据的容量。
<br />WCF默认可被提交数据的容量很小,如果数据量稍大,就会出现The remote server returned an error: NotFound,这个错误。必须要手动修改web.config来增加其容量。<br /> <br />示例如下:<br /> <br /> <br /><system.serviceModel> <behaviors> <serviceBehaviors> <behavior>原创 2010-10-27 21:33:00 · 704 阅读 · 0 评论 -
Silverlight中使用Json
Silverlight中使用WCF/Json原创 2010-11-02 12:55:00 · 651 阅读 · 0 评论 -
Load foreign key properties(Navigation Properities) in Silvelright WCF Ria services.
RIA service, silverlight,原创 2010-11-04 14:33:00 · 897 阅读 · 0 评论 -
Use Matadata file to add attributes for properties in Ria service
When you are using Ria service. You will have to create your own ADO.net entity modal. In this case, the designer will generate a lot code for you. But in the generated code, you want to add some useful attributes for some column. such as [Include] attribu原创 2010-11-05 11:18:00 · 608 阅读 · 0 评论 -
How to call SQL SP in WCF ria services.
<br />// Definition scalar method in DomainService[Invoke]public int TestGetScalar() { object r= this.ObjectContext.TestGetScalar().FirstOrDefault(); if (r == null) return 0; else原创 2010-11-22 10:03:00 · 563 阅读 · 0 评论 -
Another Nice flip source code.
<br /><Grid x:Name="LayoutRoot"> <vsm:VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="FlipGroup"> <VisualState x:Name="Status1"> <Storyboard> <ObjectAnimat原创 2010-11-26 22:23:00 · 530 阅读 · 0 评论 -
Very good way of formatting data. To implement the interface System.Windows.Data.IValueConverter
Formatting data in Silverlight by using System.Windows.Data.IValueConverter原创 2010-06-03 21:40:00 · 538 阅读 · 0 评论 -
clientaccesspolicy.xml vs. crossdomain.xml
Silverlight supports two different mechanisms for services to opt-in to cross-domain access: • Place a clientaccesspolicy.xml file at the root of the domain where the service is hosted to configure原创 2010-04-26 13:55:00 · 1292 阅读 · 0 评论 -
Using IsolatedStorage in Silverlight3
IsolatedStorage which enable silverlight application store data on clients file system. Just like another style of cookie.You can use system.IO namespace to manipulate the file system. a exampl原创 2009-12-04 20:52:00 · 711 阅读 · 0 评论 -
Navigation in Silverlight 3
Key Points: 1. Make sure that you have already added the assembly System.Windows.Controls.Navigation in you project.2. Import the namespace xmlns:navigation="clr-namespace:System.Windows.Control原创 2009-09-07 12:38:00 · 1092 阅读 · 0 评论 -
Using thread in Silverlight
private void btnStart_Click(object sender, RoutedEventArgs e) { ThreadStart ts = new ThreadStart(Compute); Thread t = new Thread(ts); t.Start();原创 2009-09-07 20:21:00 · 655 阅读 · 0 评论 -
Using Silverlight Shape Controls....Path, Rectangle...
Using Silverlight Shape Controls原创 2009-09-09 13:33:00 · 494 阅读 · 0 评论 -
Customize your own Silverlight control
1. Create a new class which inherit from ContentControlnamespace SimpleButtonDemo{ public class SimpleButton : ContentControl { public event RoutedEventHandler Click; pub原创 2009-09-10 13:20:00 · 521 阅读 · 0 评论 -
Using Themes in Silverlight
1. You should firstly add System.Windows.Controls.Theming.Toolkit.dll reference to your project. The path in my machine is C:/Program Files/Microsoft SDKs/Silverlight/v3.0/Toolkit/Jul09/Bin 2. Add原创 2009-09-14 10:48:00 · 761 阅读 · 0 评论 -
Use Triggers in Silverlight
You can use triggers to define some simple animation in Silverlight.For current version of Silverlight, it only support one RouteEvent for the trigger. that is Element.LoadedYou can refer to the原创 2009-09-11 15:07:00 · 586 阅读 · 0 评论 -
Create a nice Navigation Flip in Silverlight3
1. Add Navigation assembly in the application and import the namespace for the assembly.xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"2. In原创 2009-09-16 13:46:00 · 653 阅读 · 0 评论 -
the Data Form in Silverlight
1. Create data entitypublic class Person:INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private string firstName; private string原创 2009-09-15 22:32:00 · 780 阅读 · 1 评论 -
Communicate with different Silverlight Application in the browser
1. Create two Silverlight Applications which are sharing the same asp.net application. When rebuilt the two SL application, the *.xap files will be generated to the folder ./ClientBin 2. Imported原创 2009-09-14 16:43:00 · 430 阅读 · 0 评论 -
Element to Element Binding in Silverlight
In the old days, if you want a TextBlock to display the Silder value, you can use two ways, 1. Create a business object to hold the Silder Value and then bind it to the TextBlock objec.2. You ca原创 2009-09-16 11:05:00 · 508 阅读 · 0 评论 -
Silverlight中为Margin添加动画
因为在Silverlight中没有ThicknessAnimation,所以为Margin添加动画有点麻烦:1. 使用ObjectAnimationUsingKeyFrames来做,这个就是通过计算要显示的每一帧内容来设置动画,可能看起来不是那么平滑,如果需要平滑的话,那样就需要写代码来动态生成动画效果,看起来会平滑很多。使用XAML来进行描述就是这样:原创 2012-12-02 20:46:14 · 1743 阅读 · 0 评论