windows-phone

Visual Studio Apache Cordova browser app

房东的猫 提交于 2019-12-11 23:09:04
问题 I have been asked to develop an Apache Cordova app with Visual Studio 2015 that will simply load a website after login then the website will function as per its own functionality. And the app needs to work on Android, Apple & WP. I thought I had done it as samples are so simple but I cannot get it to work. Can somebody please point me in the direction of sample code that does this. I have tried the InAppBrowser package but it does not load anything, it simply shows a page with my commands and

How to know if an item is visible to user?

筅森魡賤 提交于 2019-12-11 21:41:35
问题 please look at this: <Grid> <ScrollViewer> <Grid Background="Red" Width="50" Height="50" VerticalAlignment="Top" Margin="0,-50,0,0"/> </ScrollViewer> </Grid> here the red grid is not visible because of its margin. but when user pulls down, it will be visible on the screen. How can I know when it is visible? thanks. (It's a WP8 app, if that matters) 回答1: This method might come handy for you. private bool IsUserVisible(FrameworkElement element, FrameworkElement container) { if (!element

Load File from SDCard

試著忘記壹切 提交于 2019-12-11 20:38:16
问题 I integrated (this)EPUB Reader reader to my project. It is working fine. & I want to load the file from SDCard instead of Isolated storage of device To open file from Isolated storage we have IsolatedStorageFileStream like this IsolatedStorageFileStream isfs; using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication()) { try { isfs = isf.OpenFile([Path to file], FileMode.Open); } catch { return; } } ePubView.Source = isfs; For file in SDcard I tried like this

Visual Studio 2013 and Windows Phone

浪尽此生 提交于 2019-12-11 20:37:46
问题 I have installed Visual Studio 2013 Pro and then I wanted to install Windows Phone 8 SDK. But it installed Express Edition of VS 2012. Now if I delete VS 2013, what happens with my VS 2012? Can I delete it, because I don't have enough memory for it? Can you help me, please! 回答1: You can install this version of Visual Studio on a computer that already has an earlier version installed. but If you uninstall a version of Visual Studio on a computer that has more than one version installed, the

What the different between System.Windows.Controls.Page and Windows.UI.Xaml.Controls.Page

╄→尐↘猪︶ㄣ 提交于 2019-12-11 20:10:13
问题 There are two Page class under System.Windows.Controls and Windows.UI.Xaml.Controls, when I new a windows phone page, both page works fine. What the different between those two page, and how to choose which to use? 回答1: The major Difference between them are where are they used and Referenced. System.Windows.Controls is used for windows phone 8 Silverlight Application and Windows.UI.Xaml.Controls is used for Windows 8 [Windows Store apps] and Windows Phone 8.1 [Windows Runtime apps]

Launch application automatically from a push notification on Windows Phone 8

孤街醉人 提交于 2019-12-11 19:49:09
问题 I would like to launch an application using parameters provided from a push notification on Windows Phone 8. The behaviour I wish to achieve is that as soon as the user receives the notification, the application will be launched with the parameters provided in the notification. I.e. seamlessly present the notification in a more user friendly way. As far as I understood there are three push notification mechanisms. Toasts, Tiles and Raw. None of them seems to be able to handle the wanted

Xaml inside ContentControl and binding to DependencyProperty

≯℡__Kan透↙ 提交于 2019-12-11 19:43:39
问题 I have two questions about developing at Windows Phone: I want to create custom control and be able to provide some extra XAML inside it. So I use ContentControl with ContentPresenter inside ControlTemplate . <ContentControl> <ControlTemplate> <TextBlock Name="TextBlockControl" Text="Existing controls"/> <ContentPresenter/> </ControlTemplate> </ContentControl> It worked, but I can't access TextBlockControl inside ControlTemplate from code-behind. FindName always returns null. Secondly, I want

Windows Phone 8 mp3 playing problems

牧云@^-^@ 提交于 2019-12-11 19:26:48
问题 I am trying to play mp3 in my wp 8 app, i think forgot something, can you please help my simplified code is as it goes: in page.xaml.cs code is: public void Play(object sender, RoutedEventArgs e) { if (PlayState.Playing == BackgroundAudioPlayer.Instance.PlayerState) { BackgroundAudioPlayer.Instance.Pause(); } else { BackgroundAudioPlayer.Instance.Play(); } } in App.xaml.cs code is: using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication()) { string[] files = new

Pushpin location binding in windows phone 8 app is not working

好久不见. 提交于 2019-12-11 19:26:11
问题 i am developing a windows phone 8 app, in which i have to display a pushpin to current location. while running the code it is showing an exception: "An exception of type 'System.NullReferenceException' occurred in MapTestApp.DLL but was not handled in user code" public MainPage() { InitializeComponent(); geolocator = new Geolocator(); geolocator.DesiredAccuracy = PositionAccuracy.High; geolocator.MovementThreshold = 100; // The units are meters. geolocator.StatusChanged += geolocator

How to auto scale an image for all resolutions?

坚强是说给别人听的谎言 提交于 2019-12-11 19:23:16
问题 There are two images in a page of my app, one is a fixed frame and the other will change time to time. I want the page to be auto scaled for all resolutions (WVGA,WXGA, 720p). So according to the documentation I should not set numbers but use "Auto" or "*" to be auto scaled for all resolutions. Ok this is good for frame, but what about the inner picture? how can I set it to be in a distance of the edges to be exactly inside the frame? <Image Name="Frame" Source="/MyApplication;component