windows-phone-8

How to Get Qibla Direction at Compass Windows Phone 8?

谁都会走 提交于 2021-01-28 14:00:28
问题 I'm developing an Islamic app which has Qibla feature. I can determine Qibla direction in degrees from my current location using my longitude and latitude. For examle: From Cairo, Qibla direction will be 137 degree. How to make compass sensor in windows phone navigate to this angle? Edit: I'm using this method to get sensor heading readings: public void RunCompass() { try { if (Compass.IsSupported) { // If compass sensor is supported create new compass object and attach event handlers Compass

Get Source Code from Webview (VB for Metro)

会有一股神秘感。 提交于 2021-01-27 13:36:39
问题 I'm Making a Windows Phone's app that I can, From a webview called "DebWeb", get the ClassRoom of a specific class. The DebWeb load the site where is all the classRooms, but I want to make that my App search just my class. Before I made an app with almost the same objetive (search the Name of a App from the Source Code), but it was made from VB for PC, now I'm working on VB for Metro (or for App Store) and I can't use the same code. For example, On VB for PC I can use: Dim EHTML = DebWeb

System.Collections.Generic.KeyNotFoundException in Windows Phone

房东的猫 提交于 2021-01-27 05:27:35
问题 i got a Problem with this following Code: string name = (string)PhoneApplicationService.Current.State["name"]; names.Add(name); InitializeComponent(); List.ItemsSource = names; by: string name = (string)PhoneApplicationService.Current.State["name"]; i got the error message: An exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.ni.dll but was not handled in user code The Code is in C#. I try to use an Variabel from the othe Page. How can i ask if the

How to make a squared image to a round image on Windows Phone

徘徊边缘 提交于 2020-12-29 03:25:04
问题 how is it possible to make a round image on Windows Phone of a squared image. I have a lot of images which should be displayed as a circle. But how can I do this? Thank. 回答1: In XAML you want to make the circle using an Ellipse control. Then give it an ImageBrush fill. <Ellipse Height="100" Width="100"> <Ellipse.Fill> <ImageBrush ImageSource="YourImage.png"/> </Ellipse.Fill> </Ellipse> 回答2: My idea is very simple: <Image Source="ImagePath" Width="326" Height="188"> <Image.Clip>

How to make a squared image to a round image on Windows Phone

好久不见. 提交于 2020-12-29 03:23:05
问题 how is it possible to make a round image on Windows Phone of a squared image. I have a lot of images which should be displayed as a circle. But how can I do this? Thank. 回答1: In XAML you want to make the circle using an Ellipse control. Then give it an ImageBrush fill. <Ellipse Height="100" Width="100"> <Ellipse.Fill> <ImageBrush ImageSource="YourImage.png"/> </Ellipse.Fill> </Ellipse> 回答2: My idea is very simple: <Image Source="ImagePath" Width="326" Height="188"> <Image.Clip>

Calling Async method in class constructor in C# [duplicate]

岁酱吖の 提交于 2020-12-26 04:01:01
问题 This question already has answers here : Can constructors be async? (12 answers) Closed 5 years ago . Currently I'm developing an universal app using c#. In app I used sqlite as database and as you may now It has async methods. I have a class with some null property that I'll fill them using data I fetch from db, but It should be done exactly in class constructor. The problem is that using async methods is not allowed, So I tried creating a new async method and using sqlite methods and

Calling Async method in class constructor in C# [duplicate]

淺唱寂寞╮ 提交于 2020-12-26 03:59:21
问题 This question already has answers here : Can constructors be async? (12 answers) Closed 5 years ago . Currently I'm developing an universal app using c#. In app I used sqlite as database and as you may now It has async methods. I have a class with some null property that I'll fill them using data I fetch from db, but It should be done exactly in class constructor. The problem is that using async methods is not allowed, So I tried creating a new async method and using sqlite methods and

WP8 MvvmLight namespace missing and EventToCommand doesn't exist

半城伤御伤魂 提交于 2020-06-25 10:15:38
问题 I am using MVVM Light libraries only (from Nuget package) in my Windows Phone 8 project and I want to use EventToCommand in ToggleSwitch . I have these lines of codes: <toolkit:ToggleSwitch x:Name="LockSwitch" IsChecked="{Binding IsLock, Mode=TwoWay}"> <i:Interaction.Triggers> <i:EventTrigger EventName="Toggled"> <Command:EventToCommand Command="{Binding DataContext.NavigateToArticleCommand, ElementName=LayoutRoot}" CommandParameter="{Binding}" /> </i:EventTrigger> </i:Interaction.Triggers> <