silverlight 如何跳转

来源:百度知道 编辑:UC知道 时间:2024/05/30 13:48:26
silverlight 中如何可以在两xaml中实现跳转,在网上找到是用APP中的StartUp方法跳转,但实现不了,能说详细点嘛??各位大虾救命~~~

.先在silverlight项目中新建一个接口文件IContent.cs,内容如下(namespace请各位根据自己的实际情况修改):

--------------------------------------------------
using System.Windows;

namespace BookStore
{
public interface IContent
{
UIElement Content { get; set; }
}
}

步骤2.建二个Xaml文件Test.xaml和Test2.Xaml

Test.Xaml完整内容如下:

---------------------------------------------------------------------
<UserControl x:Class="BookStore.Test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="600" Height="400">
<Grid x:Name="LayoutRoot" Backg