09 2012 档案

关于page 的NavigationCacheMode
摘要:NavigationCacheMode 默认是disabled的如果我们给NavigationCacheMode 为disabled,同时在page 的protected override void OnNavigatedFrom(NavigationEventArgs e) { Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; Windows.Storage.ApplicationDataContainer bitimg 阅读全文

posted @ 2012-09-24 10:22 GIS-MAN 阅读(1963) 评论(0) 推荐(0) 编辑

win8 metro 停靠
摘要:停靠前 停靠后 方法是在snapped 里面里面给gridview两个style 当然这两个style 里面的属性都需要更改,尤其是verticalbar 设为可见并且scrollmode为enabled 阅读全文

posted @ 2012-09-21 11:10 GIS-MAN 阅读(172) 评论(0) 推荐(0) 编辑

HTTP连接碎知识
摘要:你每次在浏览器里,敲一个网址,发送一个请求,就是向服务器的80(可能是其他也说不定)端口建立一个连接,当服务器返回后,如果没有keepalive,链接就会断开只要http头里写着keep-alive,就会保持链接,不创建新链接(打杂)广州Tony强(332731151) 11:10:56 tcp,创建连接比较消耗资源,如果操作不频繁,就可以断开譬如,我们的浏览器,也是tcp 阅读全文

posted @ 2012-09-20 11:36 GIS-MAN 阅读(185) 评论(0) 推荐(0) 编辑

打开一个网页 metro app
摘要:await Windows.System.Launcher.LaunchUriAsync(new Uri(((HyperlinkButton)sender).Tag.ToString())); 阅读全文

posted @ 2012-09-20 11:30 GIS-MAN 阅读(213) 评论(0) 推荐(0) 编辑

关于主题动画.主题过度
摘要:http://www.cnblogs.com/trigged/archive/2012/03/31/2427508.html http://msdn.microsoft.com/zh-cn/library/windows/apps/xaml/br243232.aspx 给gridview 里面的每个子项 添加 从右边进入的动画 <GridView.ItemTemplate> <DataTempl... 阅读全文

posted @ 2012-09-20 10:42 GIS-MAN 阅读(217) 评论(0) 推荐(0) 编辑

metro app 进行缓存,
摘要:一些页面每次请求服务端的数据都是一样的,这样就可以请求一次,然后把数据缓存起来 在OnNavigatedFrom 添加如下的语句 由于不能对一个集合对象进行缓存,下面介绍如何缓存一个几个集合对象,以 ObservableCollection<Advertisement>,为例 要想缓存这个集合, 需要对Advertisement,每个属性 创建一个 Windows.Storage.Applica... 阅读全文

posted @ 2012-09-20 09:36 GIS-MAN 阅读(436) 评论(0) 推荐(1) 编辑

metro app 里面那几个合约 ,请求
摘要:search合约using Windows.ApplicationModel.DataTransfer;SearchPane.GetForCurrentView().SuggestionsRequested += OnSuggestionsRequested;//当点击右边的search 按钮是触发void OnSuggestionsRequested(SearchPane sender, SearchPaneSuggestionsRequestedEventArgs args){ string query = args.QueryText.ToLower();string[] terms = 阅读全文

posted @ 2012-09-19 10:35 GIS-MAN 阅读(561) 评论(0) 推荐(0) 编辑

metro 拖动元素 元素
摘要:public sealed partial class MainPage : Page { // Global Transform used to change the position of the Rectangle. private TranslateTransform dragTranslation; // Constructor public MainPage() { InitializeComponent(); // Add handler for the Ma... 阅读全文

posted @ 2012-09-18 14:24 GIS-MAN 阅读(320) 评论(0) 推荐(0) 编辑

metro 下载xml文件
摘要:public class downClass1 { public IStorageFile pResultStorageFile; public async Task<IStorageFile> down() { string CountriesFile = "fruit.xml"; StorageFolder InstallationFolder = Windows.ApplicationModel.Package.Current.InstalledLocation; Storage... 阅读全文

posted @ 2012-09-17 17:41 GIS-MAN 阅读(221) 评论(0) 推荐(0) 编辑

图片360 度旋转
摘要:<Image x:Name="image" HorizontalAlignment="Left" Height="166" PointerEntered="image_PointerEntered_1" PointerExited="image_PointerExited_1" Margin="449,349,0,0" VerticalAlignment="Top" Width="261" Source="http:// 阅读全文

posted @ 2012-09-17 11:58 GIS-MAN 阅读(288) 评论(0) 推荐(0) 编辑

判断gridview 滑动到最右端
摘要:首先获得girdview 里面的scrollviewer, private ChildType FindVisualChild<ChildType>(DependencyObject obj) where ChildType : DependencyObject { //if (obj != null) //{ for (int i = 0; i < VisualTreeHelper.GetChildrenCount(obj); i++) { Dependen... 阅读全文

posted @ 2012-09-17 11:34 GIS-MAN 阅读(770) 评论(2) 推荐(0) 编辑

关于查找可视树的一点问题
摘要:不能在pageload时间里面查找 阅读全文

posted @ 2012-09-17 10:44 GIS-MAN 阅读(112) 评论(0) 推荐(0) 编辑

怎么给listbox 的item 添加动画?
摘要:<GridView Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Height="600" x:Name="testAdvs" SelectionMode="None" Width="1200" ItemsSource="{Binding Path=Advertisements}"> <GridView.ItemsPanel&g 阅读全文

posted @ 2012-09-14 11:20 GIS-MAN 阅读(348) 评论(0) 推荐(0) 编辑

怎么给listbox 的item 添加动画1?
摘要:<GridView Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Height="600" x:Name="testAdvs" SelectionMode="None" Width="1200" ItemsSource="{Binding Path=Advertisements}"> <GridView.ItemsPanel&g 阅读全文

posted @ 2012-09-14 11:20 GIS-MAN 阅读(504) 评论(0) 推荐(0) 编辑

关于variablewrapgrid
摘要:http://msdn.microsoft.com/zh-cn/library/windows/apps/hh969155.aspxVariableSizedWrapGrid元素以行或列排列,当达到MaximumRowsOrColumns值会时会自动换行至新行或新列。由Orientation属性指定是按行还是列排列元素。通过使用附加属性VariableSizedWrapGrid.RowSpan和VariableSizedWrapGrid.ColumnSpan,内容可跨越多行和多列。根据ItemHeight和ItemWidth属性的指定设置元素大小。如果子内容超出面板,则不会超出面板边界且视觉上 阅读全文

posted @ 2012-09-13 16:16 GIS-MAN 阅读(434) 评论(0) 推荐(0) 编辑

支持metro style app 的框架已经出来了
摘要:mvvmlight toolkit 和mvvm helpers for metrocaliburn。micro 阅读全文

posted @ 2012-09-12 18:42 GIS-MAN 阅读(222) 评论(0) 推荐(0) 编辑

转一个orbitpanel
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Windows.Foundation;using Windows.UI.Xaml;using Windows.UI.Xaml.Controls;namespace App8{ public class orbitpanel:Panel { int i = 0; public int orbitsnunber {... 阅读全文

posted @ 2012-09-12 15:38 GIS-MAN 阅读(272) 评论(0) 推荐(0) 编辑

碎知识
摘要:设置点击输入框时弹出的键盘类型: <TextBox.InputScope> <InputScope> <InputScope.Names> <InputScopeName NameValue="Number" /> </InputScope.Names> </InputScope> </TextBox.InputScope>其中NameValue的值即为弹出的键盘类型,可以根据自己需要进行改变page gets several events in sequence 页面事件执行顺序:• On 阅读全文

posted @ 2012-09-10 15:10 GIS-MAN 阅读(166) 评论(0) 推荐(0) 编辑

VS 11 Split application程序解析
摘要:先看看怎么把一个page 搞成启动业 页在 onLanched 事件里面把, Window.Current.Content = _rootFrame; Window.Current.Activate(); var _rootFrame = new Frame(); _rootFrame.Navigate(typeof(ItemsPage), sampleData.ItemGroups);///首先是设置 Window.Current.Content属性,然后.Activate();然后看看ItemsPage 里面有什么 ,看继承关系吧public sealed partial class I. 阅读全文

posted @ 2012-09-10 10:34 GIS-MAN 阅读(356) 评论(0) 推荐(0) 编辑

async await ,一步一步试用
摘要:public class downClass1 { public IStorageFile pResultStorageFile; public async Task<IStorageFile> down() { string CountriesFile = "fruit.xml"; StorageFolder InstallationFolder =Windows.ApplicationModel.Package.Current.InstalledLocation; ... 阅读全文

posted @ 2012-09-05 16:49 GIS-MAN 阅读(350) 评论(0) 推荐(0) 编辑

两数组是否“相等”?。NET 下
摘要:http://www.codesky.net/article/200912/124632.html在.NET 4.0中我们将看到数组方面有很大的改进,本文将给大家讨论的是.NET 4.0数组的新增功能,希望对大家用好.NET 4.0数组有所帮助。1 两数组是否“相等”?在实际开发中,有时我们需要比对两个数组是否拥有一致的元素,例如,以下两个数组由于拥有相同的元素,因此被认为是相等的:int[]arr1=newint[] { 1,2,3,4 }; int[]arr2=newint[] { 1,2,3,4 };在.NET早期版本中,要实现上述数组比对功能,必须自己动手编写一个函数,在其内部使用循环 阅读全文

posted @ 2012-09-05 14:47 GIS-MAN 阅读(1035) 评论(1) 推荐(0) 编辑

BitArray
摘要:using System; using System.Collections; public class SamplesBitArray { public static void Main() { // Creates and initializes several BitArrays. BitArray myBA1 = new BitArray( 5 ); BitArray myBA2 = new BitArray( 5, false ); byte[] myBytes = new byte[5] { 1, 2, 3, 4, 5 }... 阅读全文

posted @ 2012-09-05 14:43 GIS-MAN 阅读(257) 评论(0) 推荐(0) 编辑

File I/O in Windows Runtime
摘要:The following obtains a directory listing of all files in the documents folder:StorageFolder docsFolder = KnownFolders.DocumentsLibrary;IReadOnlyList<StorageFile> files = await docsFolder.GetFilesAsync();foreach (IStorageFile file in files)Debug.WriteLine (file.Name);The CreateFileQueryWithOpt 阅读全文

posted @ 2012-09-05 14:19 GIS-MAN 阅读(319) 评论(0) 推荐(0) 编辑

TCP in Windows Runtime(运行时)
摘要:Windows.Networking.Sockets namespaceAs with the .NET implementation, there are two primary classes to handle server and client roles. In WinRT, these are StreamSocketListener and StreamSocket.The following method starts a server on port 51111, and waits for a client to connect,It then reads a single 阅读全文

posted @ 2012-09-05 11:38 GIS-MAN 阅读(552) 评论(0) 推荐(0) 编辑

FlipView 知识准备
摘要:<FlipView x:Name = "flipView1" Width = "480" Height = "270" BorderBrush = "Black" BorderThickness ="1"> <FlipView.ItemTemplate> <DataTemplate> <Grid > <Image Width = "480" Height = "270" Source = "{ 阅读全文

posted @ 2012-09-05 10:29 GIS-MAN 阅读(294) 评论(0) 推荐(0) 编辑

metro style 里面的控件一览 以 Windows.UI.Xaml.Controls空间
摘要:ClassDescriptionAppBarRepresents the container control that holds app UI components for commanding and experiences.BorderDraws a border, background, or both, around another object.ButtonRepresents a templated button control that interprets a Click user interaction.CanvasDefines an area within which 阅读全文

posted @ 2012-09-04 16:25 GIS-MAN 阅读(1420) 评论(0) 推荐(0) 编辑

metro style app 的程序构成 以c# 为例
摘要:windows rt (windows 运行时) 这个一定有,还有.NET Framework 提供托管类型的子集,该子集可通过 C# 或 Visual Basic 创建用于 Windows 的 Metro 风格应用程序。这个托管类型子集名为.NET for Windows Store apps,允许 .NET Framework 开发人员在熟悉的编程框架中创建 Metro 风格应用程序托管类型位于以System开头的命名空间中,Windows 运行时类型位于以Windows开头的命名空间中,在 .NET Framework 桌面应用程序中使用的类型在.NET for Windows Stor 阅读全文

posted @ 2012-09-04 16:04 GIS-MAN 阅读(222) 评论(0) 推荐(0) 编辑

Deriving from BindableBase更简单的绑定通知
摘要:Visual Studio creates a BindableBase class in the Common folder of your projects. (Don’t confuse this class with the BindingBase class from which Binding derives.)BindableBase 是像下面这样定义的public abstract class BindableBase : INotifyPropertyChanged{ public event PropertyChangedEventHandler PropertyChang 阅读全文

posted @ 2012-09-04 15:17 GIS-MAN 阅读(1211) 评论(0) 推荐(0) 编辑

Data Binding Notifications绑定通知
摘要:The standard way for a View Model to serve as a binding source is by implementing the INotifyPropertyChanged interface defined in the System.ComponentModel namespace. This interface has an exceptionally simple definition:public interface INotifyPropertyChanged { event PropertyChangedEventHandler Pro 阅读全文

posted @ 2012-09-04 15:06 GIS-MAN 阅读(228) 评论(0) 推荐(0) 编辑

漫游应用程序数据
摘要:http://blogs.msdn.com/b/windowsappdev_cn/archive/2012/07/25/roaming.aspxApplicationData 划分为三大类数据,我们将这三个类别称为位置:本地、漫游和临时了解用户数据和应用程序数据之间的差别。用户数据是指用户在使用应用程序过程中创建和管理的数据,例如用户的文档、音乐、视频和图片。也可以是用户十分珍视或者要在不同应用程序之间共享的任何内容。这类数据应该存储在其中一个 KnownFolder 库中,或使用 SkyDrive API 进行漫游。密码应始终使用 PasswordVault 进行存储和漫游。本博文所涵盖的范 阅读全文

posted @ 2012-09-04 14:34 GIS-MAN 阅读(622) 评论(0) 推荐(0) 编辑

最大程度地利用像素,适应视图状态的变更___转
摘要:http://blogs.msdn.com/b/windowsappdev_cn/archive/2012/04/25/getting-your-pixels.aspx在 Windows 8 中,您的应用程序将在各种屏幕尺寸和不同视图状态下运行。用户可能将应用程序分屏显示于 25 英寸的台式计算机显示器的一侧,也可能将其全屏显示于 10 英寸的宽屏平板设备。但是无论是哪种情形,您都希望您的应用程序能够充分利用可用空间。在本篇博文中,我将向您展示如何在代码中跟踪您应用程序的当前尺寸和视图状态,并为您提供一些有关在 Windows 8 Consumer Preview 中编写应用程序的技巧,从而让 阅读全文

posted @ 2012-09-04 14:15 GIS-MAN 阅读(260) 评论(0) 推荐(0) 编辑

ListView 和 GridView ————转
摘要:1. 选择 ListView 或 GridViewListView 和 GridView 控件均用于显示应用中数据的集合。它们的功能十分相似,但是显示数据的方式不同。它们都派生自 ItemsControl 类。ListView 采用垂直堆叠的方式显示数据。该控件常用于显示按顺序排列的项目列表,如电子邮件列表或搜索结果列表。它在主从式列表情况下也很有用,其中的列表项仅包含少量信息,并且选定项目的详细信息会单独显示。GridView 采用水平堆叠的方式显示数据。对于占驻较多控件的每个项目(如照片库),当你需要为其显示丰富的视觉信息时,该控件很常用。你可以通过将项直接添加到其 Items 集合或将其 阅读全文

posted @ 2012-09-04 09:57 GIS-MAN 阅读(11327) 评论(0) 推荐(1) 编辑

Windows 8里的标准化输入
摘要:http://blogs.msdn.com/b/windowsappdev/archive/2012/07/02/modernizing-input-in-windows-8.aspx支持的输入类型:(mouse, touch, pen, touchpads)输入来源(slate(平板), all-in-one(一体机), desktop, laptops(笔记本), convertibles)Finally, the Windows Runtime input APIs are at the bottom layer of the stack. These APIs (GestureReco 阅读全文

posted @ 2012-09-04 09:27 GIS-MAN 阅读(285) 评论(0) 推荐(0) 编辑

The FlyoutCONTROL
摘要:http://blogs.msdn.com/b/eternalcoding/archive/2012/07/03/tips-and-tricks-for-c-metro-developers-the-flyout-control.aspxThis article starts a new series about small (but I hope useful) tips that can help you during your development phase.Today I will talk about how you can create a flyout control.A f 阅读全文

posted @ 2012-09-03 17:55 GIS-MAN 阅读(255) 评论(0) 推荐(0) 编辑

页面嵌套
摘要:<StackPanel Orientation="Vertical" Grid.Column="1"> <TextBlock Style="{StaticResource HeaderTextStyle}" Margin="10" Text="Item Detail"/> <Frame x:Name="ItemDetailFrame"/> </StackPanel>在LISTpage 的onavigated 的方法里面, Ite 阅读全文

posted @ 2012-09-03 17:10 GIS-MAN 阅读(246) 评论(0) 推荐(0) 编辑

win8 metro 弹出一个部分
摘要:<Popup x:Name="AddItemPopup" IsLightDismissEnabled="True" Width="435" Height="265" > <StackPanel Background="Black"> <Border Background="#85C54C" BorderThickness="4"> <Grid Margin="10"> <Grid.R 阅读全文

posted @ 2012-09-03 16:52 GIS-MAN 阅读(372) 评论(0) 推荐(0) 编辑

win8 获得地理坐标
摘要:using Windows.Devices.Geolocation; Geolocator geoloc = new Geolocator();Geoposition position = await geoloc.GetGeopositionAsync();//h获得地理坐标 HttpClient httpClient = new HttpClient(); httpClient.BaseAddress = new Uri("http://nominatim.openstreetmap.org"); HttpResponseM... 阅读全文

posted @ 2012-09-03 16:25 GIS-MAN 阅读(378) 评论(0) 推荐(0) 编辑

导航

< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10
点击右上角即可分享
微信分享提示