Silverlight 3 Beta 新特性解析(7)- Child Window和Shader Effect篇
2009-04-02 12:01:34 来源:WEB开发网而ContactWin.xaml.cs为:
private PersonDomainContext _personContext = new PersonDomainContext();
public ContactWin(int contactID)
{
InitializeComponent();
_personContext.Loaded += (sender, e2) =>
{
if (_personContext.Contacts.Count > 0)
this.ContactForm.CurrentItem = _personContext.Contacts[0];
};
_personContext.LoadContactByContactID(contactID);
}
修改EmployeePage.xaml.cs代码如下:
private void ViewContactButton_Click(object sender, RoutedEventArgs e)
{
Employee employee = this.EmployeeGrid.SelectedItem as Employee;
if (employee != null)
{
ContactWin contactWin = new ContactWin(employee.ContactID);
contactWin.Show();
//this.NavigationService.Navigate(new Uri(String.Format("ContactID={0}", employee.ContactID), UriKind.Relative));
}
}
启动工程后得到如下的效果图:
Tags:Silverlight 特性
编辑录入:爽爽 [复制链接] [打 印]- ››silverlight全屏显示图片
- ››Silverlight MVVM 模式(一) 切近实战
- ››Silverlight for Windows Phone 7开发系列(1):...
- ››Silverlight for Windows Phone 7开发系列(2):...
- ››Silverlight for Windows Phone 7开发系列(3):...
- ››Silverlight for Windows Phone 7开发系列(4):...
- ››Silverlight for Symbian
- ››Silverlight3系列(四)数据绑定 Data Binding 1
- ››silverlight2 游戏 1 你能坚持多少秒
- ››Silverlight开发实践--PicZoomShow
- ››Silverlight自定义控件开发 - 令人懊恼的OnApplyT...
- ››Silverlight 2 RTW中ToolTipService.ToolTip不继承...
更多精彩
赞助商链接