Windows8 BackgroundTransfer UpLoad

摘要: private CancellationTokenSource cts; public ScenarioInput2() { InitializeComponent(); cts = new CancellationTokenSource(); } async void FrameLoaded(object sender, object e) { await DiscoverActiveUploadsAsync(); } ... 阅读全文
posted @ 2013-03-28 15:08 JackSlaterYu 阅读(280) 评论(0) 推荐(0) 编辑

Windows8 BackgroundTransfer DownLoad

摘要: private List<DownloadOperation> activeDownloads; private CancellationTokenSource cts; public ScenarioInput1() { InitializeComponent(); cts = new CancellationTokenSource(); } async void FrameLoaded(object sender, object e) { ... 阅读全文
posted @ 2013-03-28 14:56 JackSlaterYu 阅读(382) 评论(0) 推荐(0) 编辑

Transform变换

摘要: //TranslateTransform平移变换 <!--将矩形水平移动50单位,垂直移动50单位--> <Rectangle Height="50" Width="50" Fill="SkyBlue" Stroke="Blue" StrokeThickness="2" Canvas.Left="100" Canvas.Top="100"> <Rectangle.RenderTransform> <Translat 阅读全文
posted @ 2013-03-28 14:10 JackSlaterYu 阅读(185) 评论(0) 推荐(0) 编辑

Windows8 TileWithText && TileWithImage

摘要: private TileUpdater tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication(); private void TileWithText_Click(object sender, RoutedEventArgs e) { ITileWideText03 tileContent = TileContentFactory.CreateTileWideText03();//tileContent tileContent.Tex... 阅读全文
posted @ 2013-03-28 13:50 JackSlaterYu 阅读(140) 评论(0) 推荐(0) 编辑

VirtualizingStackPanel虚拟化|StackPanel的用法

摘要: <Grid Background="Transparent"> <StackPanel Margin="120 0 0 0" Orientation="Horizontal"> <!--ListBox - 列表框--> <!--xaml 方式为 ListBox 添加数据--> <ListBox x:Name="listBox" Width="200" Height="300" Margin="5" Ho 阅读全文
posted @ 2013-03-28 13:20 JackSlaterYu 阅读(1120) 评论(0) 推荐(0) 编辑

VisualTreeHelper类的使用

摘要: <Grid Background="Transparent"> <StackPanel Margin="120 0 0 0"> <Grid Name="container" HorizontalAlignment="Left" VerticalAlignment="Top" Tapped="container_Tapped_1"> <Rectangle Name="rectangle" Width="30 阅读全文
posted @ 2013-03-28 13:09 JackSlaterYu 阅读(703) 评论(0) 推荐(0) 编辑

获取 UIElement 相对于屏幕原点所占用的矩形区域

摘要: <Grid Background="Transparent"> <StackPanel Margin="120 0 0 0"> <Grid HorizontalAlignment="Left" VerticalAlignment="Top"> <Rectangle Name="rectangle1" Width="300" Height="200" Fill="Red" /> </G 阅读全文
posted @ 2013-03-28 12:49 JackSlaterYu 阅读(261) 评论(0) 推荐(0) 编辑

MeasureArrange

摘要: <Page x:Class="Win8XamlPractise.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Win8XamlPractise" xmlns:d="http://schemas.microsoft.com/expression/ble 阅读全文
posted @ 2013-03-28 12:38 JackSlaterYu 阅读(131) 评论(0) 推荐(0) 编辑

Windows8 文件操作

摘要: //获取“库\文档”文件夹 StorageFolder storageFolder = KnownFolders.DocumentsLibrary; //创建文件以及普通string写入读取文本 private async void btnCreateFile_Click(object sender, RoutedEventArgs e) { StorageFile sf = await storageFolder.CreateFileAsync(this.tbFileName.Text.Trim()... 阅读全文
posted @ 2013-03-28 10:47 JackSlaterYu 阅读(257) 评论(0) 推荐(0) 编辑

Windows8 处理应用被Suspend与Resume的操作

摘要: public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); Application.Current.Resuming += new EventHandler<Object>(App_Resuming); } private void App_Resuming(Object sender, Object e) { // T... 阅读全文
posted @ 2013-03-28 10:31 JackSlaterYu 阅读(193) 评论(0) 推荐(0) 编辑