文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>(转)Silverlight从程序集读取xaml文件

(转)Silverlight从程序集读取xaml文件

时间:2011-03-17  来源:一粒沙

             StreamResourceInfo sri = Application.GetResourceStream(new Uri("HowTo;component/Page.xaml", UriKind.Relative));
             StreamReader sr = new StreamReader(sri.Stream);
             txtReadxml.Text = sr.ReadToEnd(); {1};component/{2}
1为程序集的名字
2为想读取的页面
page.xaml:
<UserControl x:Class="HowTo.Page"
     xmlns="http://schemas.microsoft.com/client/2007"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     Width="400" Height="300">
    <Grid x:Name="LayoutRoot" Background="White">
        <TextBlock x:Name="txtReadxml"></TextBlock>
    </Grid>
</UserControl>


排行榜 更多 +
哥布林弹球b服手游下载

哥布林弹球b服手游下载

休闲益智 下载
小马样式盒游戏下载

小马样式盒游戏下载

休闲益智 下载
异变小镇中文版下载安装

异变小镇中文版下载安装

冒险解谜 下载