您的位置:首页 > 其它

A damn at han’s Windows phone book 笔记(0-1)

2011-09-25 14:00 453 查看
快捷键

F1: back按钮

F2:Home(Start)按钮

F3:Search按钮

Pause:用键盘输入取代屏幕键盘

更多快捷键参考:http://bit.ly/emulatorshortcuts

图标

三种按钮图标如下图所示:

View Code using System.IO.IsolatedStorage;

namespace WindowsPhoneApp
{
// Encapsulates a key/value pair stored in Isolated Storage ApplicationSettings
public class Setting<T>
{
string name;
T value;
T defaultValue;
bool hasValue;

public Setting(string name, T defaultValue)
{
this.name = name;
this.defaultValue = defaultValue;
}

public T Value
{
get
{
// Check for the cached value
if (!this.hasValue)
{
// Try to get the value from Isolated Storage
if (!IsolatedStorageSettings.ApplicationSettings.TryGetValue(
this.name, out this.value))
{
// It hasn't been set yet
this.value = this.defaultValue;
IsolatedStorageSettings.ApplicationSettings[this.name] = this.value;
}
this.hasValue = true;
}

return this.value;
}

set
{
// Save the value to Isolated Storage
IsolatedStorageSettings.ApplicationSettings[this.name] = value;
this.value = value;
this.hasValue = true;
}
}

public T DefaultValue
{
get { return this.defaultValue; }
}

// "Clear" cached value:
public void ForceRefresh()
{
this.hasValue = false;
}
}
}

Application Bar

wp的Application Bar像功能按钮,iphone的Tab Bar像Tab切换。

Application Bar 最多只能有四个按钮。

若要自定义按钮图标:无圆圈边框的48*48像素的图标。图标如果现实不了,很可能是因为Build Action没有设置成Content。

Application Bar Menu中应该放:不常用的、图标不好描述含义的功能。菜单项不要超过5个。

Application Bar的Opacity属性

当小于1的时候,可见的页面会长一些(72个像素)。透明度虽然可以自定义,但只推荐以下三种:1,0.5,0。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: