windows-phone

How to do Data Virtualization for online content in windows phone?

人盡茶涼 提交于 2019-12-19 11:06:55
问题 I have an app which gets content from internet. those pieces of information are so large and can't fit in memory. LongListSelector does UI Virtualization well. remains Data Virtualization . I thought the solution is to save data in database first then show it. I have no idea how to do it and these are questions in my head: Is that how I should do Data Virtualization ? what happens if there is no enough space. any source or tip is appreciated. thanks. 回答1: Basic idea of data virtualization is

How to get the device orientation changed event under Windows Phone

你。 提交于 2019-12-19 10:46:23
问题 With windows phone, is there an event I can register for when the device entered landscape mode? The reason why I am asking this is because we have a view with an input box. And when in landscape mode, the TextBox is partially blocked by the keyboard. So I am thinking may have to hide some additional information on the page when it is in landscape mode (for example, hide the title of the page and etc.). The following is a simple example. Left: Before keyboard is shown; Right: After keyboard

Can I bind to a utility class?

懵懂的女人 提交于 2019-12-19 09:17:06
问题 I have a common class filled with generic functions like the one below to parse a text box: public static void DoubleParse_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Decimal) { var textBox = sender as TextBox; if (textBox != null) textBox.Text += Convert.ToChar(CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator); } else { e.Handled = (e.Key >= Key.D0 && e.Key <= Key.D9) || (e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9) || e.Key == Key.Back || e.Key == Key.Delete |

Can I bind to a utility class?

谁说我不能喝 提交于 2019-12-19 09:17:00
问题 I have a common class filled with generic functions like the one below to parse a text box: public static void DoubleParse_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Decimal) { var textBox = sender as TextBox; if (textBox != null) textBox.Text += Convert.ToChar(CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator); } else { e.Handled = (e.Key >= Key.D0 && e.Key <= Key.D9) || (e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9) || e.Key == Key.Back || e.Key == Key.Delete |

Using Async CTP with Portable Class Library

被刻印的时光 ゝ 提交于 2019-12-19 07:23:51
问题 I am trying to rewrite a project into a Portable Class Library. But the problem is that it is using Async CTP, and I can't compile it as a library for WP and Windows Store App. If I don't include reference AsyncCtpLibrary.dll, compiler says that The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) If i include it, compiler still says the same errors and adds a warning: The primary reference "AsyncCtpLibrary" could not

Preserving HTTPOnly cookies on Windows Phone

烂漫一生 提交于 2019-12-19 05:21:34
问题 I have an app that sends a username and password to an API via HTTPS. The API returns HTTPOnly cookies. This means that the cookies are "invisible" to the code, but still exist and will be sent to the server in subsequent requests. The Set-Cookie header is stripped from the HttpWebResponse.Headers and the cookie does not appear in the HttpWebResponse.Cookie s or the HttpWebRequest.CookieContainer . However, if a subsequent request is made using that same HttpWebRequest.CookieContainer they

How to programmatically copy/paste in windows phone? [duplicate]

不羁的心 提交于 2019-12-19 05:18:40
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Can the new WP7 cut and paste functionality be used programatically? Is there a way to programmatically copy/paste text in windows phone. I want the user to click on a button that should automatically copy some text to the clipboard. The text resides on a TextBlock control (which may be hidden). The only workaround that I have thought of is to pop a dialog with the text filled in in a TextBlock (which natively

Any way to save an UIElement created programmatically in an image file?

柔情痞子 提交于 2019-12-19 04:14:19
问题 I'm trying to save an UIElement created programmatically in a JPG/PNG/BMP image in a Windows Phone 8.1 (C#) application. I'm using the class RenderTargetBitmap using the method RenderAsync() but it only works with UI elements created in the XAML code. When I use it on UI elements created directly in C# I have this exception: "System.ArgumentException (Value does not fall within the expected range.)" Am I doing something wrong or this class doesn't allow rendering of UIElement(s) created

How can I get the Windows 8 Phone emulator to run via VirtualBox?

蹲街弑〆低调 提交于 2019-12-19 02:47:08
问题 First I'm not sure my computer can handle the VirtualBox and Windows 8 phone emulator because there is no button for the run emulator. Is there a certain requirement I need to run the emulator for Windows Phone 8 and VirtualBox? 回答1: Copy the Flash.vhd from an installed Windows Phone 8 SDK and use it as the virtual disk in VirtualBox with the guest configured for Windows 8. It works for me with a Mac host, but I have an invisible mouse pointer so interaction is difficult. 回答2: The hardware

Image as pushpin on maps - Windows phone 8

孤人 提交于 2019-12-18 18:08:44
问题 im trying to add a image to a windows phone 8 map, to serve as a pushpin i have the following code on my XAML <phone:PhoneApplicationPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas