windows-phone-7

How do I navigate from one xaml page to another, and pass values?

狂风中的少年 提交于 2019-12-31 05:17:11
问题 Somewhat related to this topic here: Async XML Reading in Windows Phone 7 I'm developing a Windows Phone app, and I have a search function in my Search.xaml.cs file. It is called by clicking a button, it creates a search query and calls DownloadStringInBackground with it private void SearchQuery(object sender, EventArgs e) { string temp = "http://api.search.live.net/xml.aspx?Appid=myappid&query=randomqueryhere&sources=web"; DownloadStringInBackground(temp); } public static void

How to convert this line from C# to VB.net (Windows Phone 7)

你说的曾经没有我的故事 提交于 2019-12-31 05:13:48
问题 Hi I am studying some codes from the web that I need for a future project, but I am having trouble changing this code from C# to VB.net. Can someone help pleasE? this.btnAdd.Click += btnAdd_Click; 回答1: Adding event handlers is done differently in VB.NET: AddHandler btnAdd.Click, AddressOf btnAdd_Click Source 回答2: AddHandler(btnAdd.Click, AddressOf btnAdd_Click) 回答3: Most often, for simplier conversions like that, you can use the web based tool at http://www.developerfusion.com/tools/convert

Windows Phone SMS without confirmation

妖精的绣舞 提交于 2019-12-31 05:05:10
问题 Is there any possibility to send SMS without using the launcher task: SmsComposeTask in Windows Phone 7.x ? There are apps like Emergency SMS that seem to do that, meaning the SMS can be send without confirmation from the user. 回答1: No, there is no way to send an SMS without confirmation from the user. I haven't come across an emergency app that does this, but if they do, they may be using a web service to send the text instead of the phone's actual SMS facility. So instead of sending an SMS,

Error in changing the background dynamically

谁说胖子不能爱 提交于 2019-12-31 04:55:30
问题 First i've created a button(named as BackgroundChooser) that is used to change the background image dynamically(they can select their own image as background). But i have already used a default background image(image1.jpg) for my windows phone 7 application. When i click on the choose background button, it directs to our saved pictures. After that i have selected am image as my own background image. But the default background image is still doesn't changed. Then when i have changed the

IsolatedStorage causes Memory to run out

筅森魡賤 提交于 2019-12-31 04:36:11
问题 hey. I'm reading an image from Isolated Storage when the user clicks on an item like this: using (IsolatedStorageFile currentIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication()) { using (var img = currentIsolatedStorage.OpenFile(fileName, FileMode.Open)) { byte[] buffer = new byte[img.Length]; imgStream = new MemoryStream(buffer); //read the imagestream into the byte array int read; while ((read = img.Read(buffer, 0, buffer.Length)) > 0) { img.Write(buffer, 0, read); } img

Windows Phone 7 - Incoming Call Screen

孤街浪徒 提交于 2019-12-31 03:46:06
问题 Is there anyway when receiving a call to add data to the incoming call screen? I'd like to be able to add text to that screen if possible. Update: If there is no way to currently add text to this screen is there a way to trigger code based off of an incoming phone call? 回答1: The only way you can do anything in relation to an incoming call is be informed that this has happened via the Obscured event. Be aware that other things (such as an alarm) also trigger this event and there is no way

How do I take a bitmap image and save as a JPEG image file on a Windows Phone 7 device?

时光怂恿深爱的人放手 提交于 2019-12-31 03:42:05
问题 I am looking to create a function that takes a BitmapImage and saves it as a JPEG on the local Windows Phone 7 device in isolated storage: static public void saveImageLocally(string barcode, BitmapImage anImage) { // save anImage as a JPEG on the device here } How do I accomplish this? I'm assuming I used IsolatedStorageFile somehow? Thanks. EDIT: Here is what I have found so far... can anyone confirm if this is the correct way to do this? static public void saveImageLocally(string barcode,

What is the Height of the Minimized Application Bar in Windows Phone

喜夏-厌秋 提交于 2019-12-31 03:05:10
问题 I'm curious of how it would be possible to get the height of the Windows Phone application bar when in 'mini' mode. I've seen several resources on the height when the regular icon buttons are shown, but none with only the ellipses. 回答1: In codebehind: double appBarMiniSize = ApplicationBar.MiniSize; // 30.0 回答2: I'll help you solve this yourself. Create a test app and modify the mainpage to have the following xaml <phone:PhoneApplicationPage x:Class="WinPhone8App.MainPage" xmlns="http:/

WP7 - VisualTreeHelper to loop through all ListBox Items

情到浓时终转凉″ 提交于 2019-12-31 02:43:12
问题 I need to create a new ListBox based on items that are selected (checked). The following code actually worked if I only had like 20 items on the ListBox, but adding more items make it crash. Can anybody know how to make it work, or have a different aproach? Is there a limite for looping through a listBox? // worked fine for 20 items, // but my actual list contems 95 items... private void btnCreateNewList_Click(object sender, RoutedEventArgs e) { int totalItemsCB = ListCheckBoxVocabulary.Items

How to navigate to different pivot items in WP7

我与影子孤独终老i 提交于 2019-12-31 02:15:48
问题 I have a panorama page in which I have 3 buttons. I have added a pivotpage to the same project which has 3 pivot items. When I click Button 1 in panorama page it should goto the first pivot item in pivot page and when I click button 2 in panorama page it should goto the second pivot item in pivot page. How can I achieve this navigation? Please let me know. 回答1: You could pass a querystring to the pivot page and then, once the pivot is loaded, set the index to the relevant page. As a basic