windows-phone-8

Context Menu Keep Getting Wrong Object using Mvvm

帅比萌擦擦* 提交于 2019-12-24 14:05:23
问题 I am making a winodws 8 phone application and trying to have a context menu on it from the Windows Phone tool kit. I been following this tutorial but instead of list box I am using a long list selector that is built into WP8 <DataTemplate x:Key="GroceryListItemTemplate"> <StackPanel Grid.Column="1" Grid.Row="1"> <TextBlock x:Name="tbName" TextWrapping="Wrap" Text="{Binding Name}" FontSize="32"/> <TextBlock x:Name="tbProductInfo" TextWrapping="Wrap" Text="{Binding ProductInfoLabel}"

How to get timer running even when application is running in background or phone is locked in Windows Phone

ⅰ亾dé卋堺 提交于 2019-12-24 13:47:32
问题 I have a timer in my application in Windows Phone 7.1 implemented using DispatcherTimer _timer; Initialized as Sample._timer = new DispatcherTimer(); Sample._timer.Interval = new TimeSpan(0, 0, 1); Sample._timer.Tick += new EventHandler(Timer_Tick); Sample._timer.Start(); private void Timer_Tick(object sender, EventArgs e) { double newValue = Sample.Value + 1.686; if (newValue >= 100) newValue = 0; Sample.Value = newValue; txtDigitalClock.Text = GetTime(); } public string GetTime() { time +=

Keep element in view while scrolling

天大地大妈咪最大 提交于 2019-12-24 13:44:08
问题 Simpel question, I have a windows phone page that contains a scrollviewer with inside it an image , a textblock and a richtextbox . Now when the user starts scrolling I want to keep the textblock in view on top when the image has scrolled outside the page. So the effect is, user starts scrolling upwards, everything scrolls upwards, when the image is outside the page, the textblock stays at the top of the page but the richtextbox keeps scrolling upwards. Any thoughts? 回答1: Here is a way to

Imitate MessageBox - waiting for user's choice

情到浓时终转凉″ 提交于 2019-12-24 13:37:22
问题 I'm working mostly with Windows Phone and I'm trying to create something similar to MessageBox - small window that apperas and waits for user's choice (the Thread that invoked window waits). I found three ways how I can achive this goal: FIRST - TaskCompletionSource In this case my Task looks like this: TaskCompletionSource<bool> taskComplete = new TaskCompletionSource<bool>(); private async Task myTask1() { window.Show(); // Show window await taskComplete.Task; //some job run after User's

Storing data on Windows phone

血红的双手。 提交于 2019-12-24 13:35:02
问题 I'm working on an app that is going to store some favourites information that the user has added. I want to store two pieces of information for each favourite - a number and a piece of text. So it will be something like this: 123 Some text 1234 Some more text 1233 More text And so on. The number will be unique so it should be fine to use as a key and I will need to have this number stored separately anyway in order to use it to query some data. What is the best way to store this data on

How to Superscript some Text in a TextBox/TextBlock Control in windows phone 8?

大兔子大兔子 提交于 2019-12-24 13:33:44
问题 I'm working on windows phone 8 app, and m stuck here, guys i want to show some text as a superscript either in TextBox or in TextBlock where-ever possible. suggest me how can i obtained it. Thanks 回答1: Why don't you use a stackpanel wrapping a couple of textblocks instead? Then adjust the margines on the stuff you want super and subscripted. <StackPanel Orientation="Vertical"> <TextBlock Text="H2O3" FontSize="40" Margin="0,10"/> <StackPanel Orientation="Horizontal"> <TextBlock Text="H"

Navigating to another html in Windows store app

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 13:19:47
问题 I am trying to find a way to navigate to another html in my app. I tried window.location and WinJS.Navigation.navigate but none works. 回答1: Although you can get document.location and navigation to work (and note that it's document.location, not window.location), the recommended approach is to implement the app like a single-page web application, meaning that you "navigate" by dong DOM replacement inside default.html/index.html. That is, you're page context is always the default HTML page, so

Disabling keyboard of windows phone having focus on Textbox

牧云@^-^@ 提交于 2019-12-24 13:14:40
问题 I am new in Windows Phone. In my app I have a textbox where cursor will continuously blink for input at first. I have a custom dialpad to take input from users. So I have to disable the Windows Phone Keyboard. After searching online, most of the solution is based on removing the focus from textbox to hide the keyboard. In my case, its not happening since keyboard pops up and hide instantly. Any help would be highly appreciated. Another thing: I also need the cursor to be blinking in textbox.

Is it possible to handle the Visual State Changed event for the Windows Phone Toolkit HubTile?

时间秒杀一切 提交于 2019-12-24 13:12:05
问题 I would like to change the Source (Image) of a HubTile when the Visual State changes to Flipped however I don't seem to be able to get the VisualStateManager.GetVisualStateGroups working for the HubTile control from the Windows Phone Toolkit. I presume that once I have the VisualStateGroup I can then handle the CurrentStateChanged event however I don't seem to be able to get the group. I have seen the following thread which unfortunately doesn't include a code snippet :- Changing image source

IBM Worklight 6.1 - Tile badge from push notification never cleared on Windows Phone 8

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 12:53:55
问题 I'm using Worklight 6.1 and sending push notifications to Windows Phone 8. It is working swell, except for the tile badge. It is not being cleared when I use the tile to launch the app. The notification that I'm sending is: {"APNS":{ … },"GCM":{ … },"SMS":{ … },"MPNS":{"raw":{"payload":{}},"toast":{"text1":"Luggage Tracker","text2":"You have 3 available messages"},"tile":{"count":3}}} The toast message pops up, and the tile gets the badge, but the badge doesn't clear when I launch the app,