Strange Copy/Paste behaviour WP 8.1 - windows-phone

I'm developing a Windows Phone 8.1 universal app which allows the user to submit a link to a tweet.
From the Twitter WP app, select a tweet, then select the "copy link to tweet" context menu option.
Then paste that into a normal TextBox in my app and get the link followed by what appears to be Chinese characters. However, these appended characters are not consistent and vary with subsequent copy/paste.
Here are a couple of screenshots to illustrate the problem -
This is an odd one since it spans two distinct areas 1) the Twitter app itself and 2) WP 8.1.
When I paste this into Word it is fine. If I paste the same link into other TextBoxes on my page the strange characters vary.
Here is a couple of examples:
...twitter.com/TomMSFT/status/566885761476460544䓔
...twitter.com/TomMSFT/status/566885761476460544䊰灐ঔ佀玍㜀耀瑨搆玌搆
I've tried setting the Language property of the TextBox to the current culture of the phone (en-GB), no joy. This may be something the Twitter app is doing, if so, is there any way to filter out these characters when they are pasted into my app?
Anyway, this one has really got me scratching my head. Any ideas or help is appreciated.
UPDATE:
As an immediate workaround, I'm applying this solution to strip these out:
private void LinkTextBox_OnTextChanged(object sender, TextChangedEventArgs e)
{
LinkTextBox.Text = Regex.Replace(LinkTextBox.Text, #"[^\u0000-\u007F]", string.Empty);
}

Unfortunately this is a known issue with Windows Phone 8.1 apps pasting Unicode text. Some form of manual stripping (like your Regex) is needed.

Related

On opening a tabbed page for the first time, images in listview of content page not loading

I don't know if anyone else has experienced this, i've been looking for examples left, right and centre to no avail.
Anyway, i'm developing an app using Xamarin forms for ios, android and windows phone. The first page of the app is a tabbed page and the first content page consists of a listview with an image (with the source bound to a string with a url) and some labels. I get the data via binding and everything loads correctly except the images. However, when i open a new page and then go back to the tabbed page, the images suddenly appear. I'm testing on a Windows Phone 8.1 at the moment.
Anybody else experienced this? Any work arounds? Any help would be much appreciated.
This might be caused by a known issue that was fixed in 2.2.0-pre1
https://bugzilla.xamarin.com/show_bug.cgi?id=39447
Try updating to that pre-release version and seeing if it resolves your issue.

BackButton Windows Phone 8 (VB)

I have a Program with 2 Frames ("MainPage" and "Inicio", "Inicio" is the first one on be opened).
"Inicio" Has a Link to open "MainPage" and, when the user is on "MainPage", I want to make an event that when the BackButton (the <- of the phone) is pressed, the Program go back to "Inicio", but instead of it, the program is suspended and the Phone go back to the Windows Home.
I'm working on VB and I can't find any tutorial or Event to VB, all that I found on google was to C# and I don't know how to convert code from C# to VB for now.
Please Note that I'm working with VB for Metro (Or VB For App Store) and I had to define the event on the XAML, and there is the problem, because, not like when we code on .VB, I don't have suggestion or error marks. I can write "aigwiuagwa_aiuwdaiu as Handler..." and for the builder that Event exists.
The problem is that I was ussing "Blank Page", and I needed to use "Normal Page". "Normal Page" has Navigation Helper that detects if there is another Page/Frame to go back or not. Another thing is that NavigationHelper has a lot of "#IF WINDOWS_PHONE_APP Then" and it doesn't detects that it is actually an Windows Phone Apps, so the Back Button doesn't works either. The solution was to Delete that IF, and below of then is allways an "ElseIf", the thing is to replace that "ElseIf" with "#IF WINDOWS_APP then". I needed to do it 3 times. Now my app is working fine.

Basic Page vs. Blank Page

I am trying to find the difference between the uses of a basic page and a blank page on windows store apps. I am writing an application that has multiple pages and I am not sure which one to use for my main page and I can't seem to find an answer that is helpful.
Basic Page inherits Common.LayoutAwarePage. This gives your page various capabilities like the automatic back button and a visualstatemanager for snapping among other things.
Blank Page only inherits Page and does not get any of the above capabilities. So for example if you need to incorporate snapped view in your page, you need to add a handler for the size changed event in your code.
A Basic Page makes it very easy to just write all the snapped changes in your VisualStateManager in XAML and then test it without running your code using just the device tab where you can select state of your device.
The MainPage in your project is a Blank Page and I prefer to create all other pages as Basic Pages to not worry about stuff like the back button.
That being said, Windows 8.1 apps do not include the LayoutAwarePage so if you are not used to the LayoutAwarePage, do not bother.
Let me know if you need more clarification.
Go with the Basic Page as it gives you automatic back button your view's title etc, and if you don't need them you can disable them also. But for blank page you have to write code for those common things.
This blog post will help you in understanding of Basic Page vs Blank Page.
http://myblogwindow8.blogspot.com/2013/06/blank-page-vs-basic-page-template.html

Iphone, phone gap, childbrowser and email functionality

i have recently built my first app using phone gap and have managed to get childbrowser working to open PDF's. I was wondering if anyone knew how, or if it was even possible to add email functionality to Childbrowser. Currently, in the top right of the ChildBrowser bar, there is a button that produces a drop down with the option to open it in iBooks, SIGNificant and Dropbox, is it possible to edit this to add an email button or just add an email button straight into the UI bar?
I'm guessing that this cannot be done without using Obj-C. perhaps it will be included in later versions.

Silverlight - Lync Application nested in a table

I'm very new in Silverlight and the Lync-SDK. So sorry for the question from a beginner.
Long time ago, i wrote al little web application, based on php for reading out contacts from a sql database.
Now the customer expand his envoirement and place Lync. Now he want the little Lync-Status-Square in the webapplication for click to call features.
I playing a little bit with the SDK of lync.
The following problem comes up. The square of Lync is nested in a td of my table. But the Lync-Silverlight-Applet need dynamical space for hover effects or single clicks. But in my table, i have no space, specially dynamic space.
So i switch off all hover and click functionality and place the follwing buttons in the StackPanel separate.
PresenceIndicator
StartInstanceMessagingButton
StartAudiCallButton
SendEmailButton
Two of them are fine.
Clicking on the IM-Button, The Lync Client opens the right Contact in IM-Mode and i can directly type a message. Perfect!
Clicking on the Mail-Icon, an Mail-Client will open, perfect.
The PresenceIndicator just display the color, not the exactly state, thats a problem, when the color is yellow. I can display the state in a TextBlock, but i prefer a label appears while hovering over the icon.
But my mainproblem is the StartAudioCallButton. This Icon is an dropDown-Icon. And i have no space for dropdowns. I would be so nice if this icon has the same behavoior like the IM-Button. The Lync Client will open in Call Modus and i can select, which callernumber i will use. Is that possible?
Thank you for Your time!
Frank
If you're having trouble with the layout of the standard Lync SilverLight controls, then the best thing to do is implement your own SilverLight controls for the function you're having difficulty with.
User Controls are really simple to create, there are plenty of tutorials on how to get started if you're not familiar with the process.
The Lync SDK has some great walkthroughs to get you up and running with signing in to Lync and placing an audio call
I don't know of any way to get Lync to open in a Call Mode as you suggested, but if you're limited with screen space, maybe you could have your custom StartAudioCallButton open a popup with the phone numbers in?