博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年3月2日

摘要: 1.只有切換頁面 2.加上頁面傳值的功能第一部份:切換頁面同樣的先建立一個新的Silverlight專案分別建立兩個User Control,並且名命為PageSwitcher、Page2建立完成的結果接著修改PageSwitcher.xaml.cspublicpartialclassPageSwitcher : UserControl{publicPageSwitcher(){ InitializeComponent();//將一開始頁面指定為page UIthis.Content =newPage(); }//這裡是處理切換到下一頁的方法publicvoidNavigate(UserCon 阅读全文

posted @ 2011-03-02 17:52 hyd309 阅读(968) 评论(1) 推荐(0) 编辑

摘要: 新建Silverlight子窗口 using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Animation;using System.Windows.Shapes;n 阅读全文

posted @ 2011-03-02 17:49 hyd309 阅读(287) 评论(0) 推荐(0) 编辑

摘要: 使用观察者模式在 Silverlight 中切换用户控件 有一篇技巧,见http://tech.sina.com.cn/s/2008-07-03/1528718607.shtml或http://kb.cnblogs.com/page/42897/?page=1讨论的是运用InitParams在Silverlight 2应用程序中切换用户控件,这是个很笨但是直观的解决方式。但如果在控件中传值,那将怎么办?以上方法将毫无用途!今天在一个老外的博客看到有个很巧妙的方法,不敢独享,现分享出来:首先写个接口:namespace PageSwitchSimple { public interface IS 阅读全文

posted @ 2011-03-02 17:48 hyd309 阅读(393) 评论(0) 推荐(0) 编辑