Shawn Wildermuth 在CodePlex上发布了一个新的WP7工具库的项目,包含了WP7控件、转换类、帮助类等等。ide
项目的地址为:http://phoney.codeplex.com/工具
这是项目解决方案的截图,包含了示例文件字体
若是你没有安装silverlight toolkit的话直接运行程序会报以下的错误,由于默认在装Dev10的时候不会安装Silverlight的Testing库的。spa
项目描述日志
该项目包含了一些供Windows Phone 7应用程序的类和控件,以下:code
标准的转换器、一些控件、Phone日志、淡入淡出消息类、BitlyHelper 类、Twitter帮助类等xml
实例blog
BitlyHelper 类资源
一个经过使用设置本身的关键字/用户名的键值对来缩短URI的类get
使用方法:
- BitlyHelper.SetCredentials("MYBITLYAPIKEY", "MYBITLYUSERNAME");
- BitlyHelper.Shorten("http://phoney.codeplex.com", (result, error) =>
- {
- if (error != null)
- {
- MessageBox.Show(string.Concat("Error Shortening Url: ", error.Message));
- }
- else
- {
- MessageBox.Show(result, 3000);
- }
- });
FadingMessage 类
建立一个渐入渐出的提示消息,使用方法以下:
- FadingMessage.ShowTextMessage("Saved...");
固然你也能够本身定义消息的样式:
- FadingMessage msg = new FadingMessage()
- {
- MessageToShow = theMessage,
- VerticalAlignmentVerticalAlignment = VerticalAlignment.Top,
- HorizontalAlignmentHorizontalAlignment = HorizontalAlignment.Right
- };
- msg.Show(3000); // 3 seconds
Phone日志类
这个类是用来帮助你记录Phone中的简单日志的,使用方法为:
- PhoneLogger.LogError("Test Logging Message");
- var log = PhoneLogger.LogContents;
该项目中还包含一些颜色、笔刷、字体等资源。
项目源文件下载地址:http://phoney.codeplex.com/