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。
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。
相关文章推荐
- A damn at han’s Windows phone book 笔记(9 & 10)
- A damn at han’s Windows phone book 笔记(2:Flashlight)
- A damn at han’s Windows phone book 笔记(23:序列化,图片)
- A damn at han’s Windows phone book 笔记(3:ICE——In Case of Emergency)
- A damn at han’s Windows phone book 笔记(5:ruler—— canvas)
- A damn at han’s Windows phone book 笔记(8:Vibration)
- A damn at han’s Windows phone book 笔记(11:Popup)
- A damn at han’s Windows phone book 笔记(20、21、22:Isolated Storage)
- A damn at han’s Windows phone book 笔记(6:page navigation & data binding)
- Windows Phone 开发学习笔记(四) Hello Windows Phone之心有灵犀
- {WinPhone7} Book Preview: Programming Windows Phone 7 Series
- Windows Phone 开发学习笔记(六) Hello Windows Phone之生死有命
- Windows Phone 开发学习笔记(五) Hello Windows Phone之虎头蛇尾
- Windows Phone 开发学习笔记(七) Hello Windows Phone之有始有终
- windows phone Design and Interaction Guide 笔记
- Silverlight for Windows Phone 开发学习笔记(-)
- Windows Phone 开发学习笔记(二) Hello Windows Phone之不费功夫
- Windows Phone 开发学习笔记(三)Hello Windows Phone之深藏不露
- The Best Damn Windows Server 2003 Book Period
- The Best Damn Windows Server 2003 Book Period