摘要: // Create the popup object.Popup p = new Popup();privatevoid showPopup_Click(object sender, RoutedEventArgs e){ // Create some content to show in the popup. Typically you would // create a user control. Border border = new Border(); border.BorderBrush = new SolidColorBrush(Colors.Black); ... 阅读全文
posted @ 2012-11-12 21:59 hack25 阅读(1169) 评论(0) 推荐(0)
摘要: <ListBox HorizontalAlignment="Left" Margin="0,605,0,0" Name="listBox1" Width="456" UseLayoutRounding="True" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Disabled"> <ListBo 阅读全文
posted @ 2012-08-24 17:42 hack25 阅读(165) 评论(0) 推荐(0)
摘要: 为了实现三种语言一种命名方式,我采用了相同的类名,接口,namespace(package)。可以说只要熟悉了其中一个平台的代码,就可以很顺利的写出另外两个平台的滤镜代码(当然我后续还会加入更多的滤镜效果)。该库基于LGPL协议,也就是说大家可以将其免费用于自己公司的项目及产品中(包括商业项目)。当然如果大家用后觉得还可以的话,可以私下洽谈合作事宜.(包括商业方面, EMAIL: daizhj617595@126.com),呵呵!下面是使用这三个滤镜类库所实现的滤镜效果。InvertFilterAutoLevelFilterRadialDistortionFilterBannerFilter( 阅读全文
posted @ 2012-08-17 09:04 hack25 阅读(168) 评论(0) 推荐(0)
摘要: Windows Phone 7 在 Mango 更新(Windows Phone 7.5)之後新增了不少 APIs,其中一個部份就是能在程式中操作SystemTray的控制項,這個控制項本身就有提供ProgressIndicator的物件設計,所以很適合用來做為讀取中的提示訊息。使用 SystemTray 可以從設計介面的 XAML 檔案以及程式碼來下手,首先如果要在 XAML 中最上層的<phone:PhoneApplicationPage>標籤中加入下列的屬性:<phone:PhoneApplicationpage ... xmlns:shell="clr-na 阅读全文
posted @ 2012-08-05 01:07 hack25 阅读(233) 评论(1) 推荐(0)
摘要: 网上有很多用C#调用cmd的方法,大致如下:private void ExecuteCmd(string command){Process p = new Process();p.StartInfo.FileName = "cmd.exe";p.StartInfo.UseShellExecute = false;p.StartInfo.RedirectStandardInput = true;p.StartInfo.RedirectStandardOutput = true;p.StartInfo.CreateNoWindow = true;p.Start();p.Stan 阅读全文
posted @ 2012-07-30 20:32 hack25 阅读(1139) 评论(0) 推荐(1)
摘要: 在WP7的picture hub中,选中一张图片,查看图片时,点击“…”菜单,点extras…时,会出现一个菜单(这个菜单中就是可以对选中的图片进行分享或者处理的应用列表)下面介绍如何实现这个一键分享功能:在你的应用程序中新建一个叫“Extras.xml”的XML文件,里面的内容如下:<?xml version="1.0" encoding="utf-8" ?><Extras> <PhotosExtrasApplication> <Enabled>true</Enabled> </Phot 阅读全文
posted @ 2012-07-25 00:58 hack25 阅读(186) 评论(0) 推荐(0)
摘要: public void CaptureScreen(object sender, EventArgs e){ WriteableBitmap bmp = new WriteableBitmap(480, 800); bmp.Render(App.Current.RootVisual, null); bmp.Invalidate(); MemoryStream stream = new MemoryStream(); bmp.SaveJpeg(stream, bmp.PixelWidth, bmp.PixelHeight, 0, 80); stream.Seek(0, SeekOri... 阅读全文
posted @ 2012-07-24 23:56 hack25 阅读(166) 评论(0) 推荐(0)
摘要: ImageBrush backImage = new ImageBrush(); backImage.ImageSource = new BitmapImage(new Uri("Images/register_btn.png", UriKind.Relative)); button1.Background = backImage; 阅读全文
posted @ 2012-07-17 15:30 hack25 阅读(157) 评论(0) 推荐(0)
摘要: Windows Phone 7 Mango (7.1RC)开始提供删除导航历史的方法,这对开发人员来说无疑是一个巨好的消息,很多时候我们程序的第一个界面是登陆页,可是wp7程序没有退出方法,退到最后一页才能退出程序,我们当然是在程序的主界面,提示用户是否要退出程序了,现在可以做到了。MSDN上的示例代码总是把简单的事情搞得那么复杂,其实有个更简单的用法,想什么时候删除导航历史就什么时候删除,想删几个就删几个。首先打开App.xaml.cs页面,找到 public PhoneApplicationFrame RootFrame { get; private set; }方法,如果你没在这个页面添 阅读全文
posted @ 2012-06-15 19:50 hack25 阅读(376) 评论(1) 推荐(0)
摘要: 建立一个页面SplashScreen.xaml<phone:PhoneApplicationPage x:Class="WebService_CheckWeather.SplashScreen" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone. 阅读全文
posted @ 2012-06-15 19:33 hack25 阅读(400) 评论(0) 推荐(0)