windows-runtime

MediaCapture and Window VisibilityChanged

狂风中的少年 提交于 2019-12-11 07:15:30
问题 [Question] On Windows Phone 8.1, what exactly happens in between the time when the user leaves the app and the OnSuspended event fires? I'm having trouble with the ability to manage objects in that span, in particular MediaCpture object. To better explain the problem, here is the scenario: The user is on a page with a video preview being pumped to a CaptureElement The user taps the Start button The user taps Back button and returns to the page with a broken MediaCapture With WinRT there isn't

Why is my flipview not showing any pictures?

醉酒当歌 提交于 2019-12-11 06:59:43
问题 Currently I am able to select multiple files but when I click open, the selected images are not being shown. Instead, "Windows.UI.XAML.Media.Imaging.BitmapImage" appears as a text. The FlipView functionality is still there though. What am I doing wrong? XAML. <FlipView x:Name="flpView" Grid.Row="1" Margin="10, 10, 10, 10"> <Image x:Name="images" Stretch="UniformToFill" /> </FlipView> Behind code. public async Task flipviewload() { // Add code to perform some action here. Windows.Storage

Whether SIM card is available or not in windows phone universal project

家住魔仙堡 提交于 2019-12-11 06:58:43
问题 I'm creating winrt universal project for mobile and tablet. I want to check: In mobile application, I am sending a sms text to sms application like this. var message = new ChatMessage(); message.Recipients.Add("9999"); message.Body = "R*" + voucherNo + "*" + accountNo + "*" + pin; await ChatMessageManager.ShowComposeSmsMessageAsync(message); I want to place a check above that whether user has inserted sim card or using mobile with out sim card. Well app is not crashing due to this so this is

Is it possible to attach Attachements to mailto app in windows 8 metro application?

五迷三道 提交于 2019-12-11 06:53:19
问题 I am launching the mailto app in this way :- using Windows.System; //starts the default mail app with a subject, cc, bcc, and body Launcher.LaunchUriAsync(new Uri("mailto:windows8devs@almostbeta.com?subject=Code Request&cc=kevin@almostbeta.com&bcc=admin@almostbeta.com&body=Hi!")); 1) Can't we attach attachments to mailto app in windows 8? 2) If so please let me know what would be the work around ? Thanks in advance. 回答1: No, you can't attach files to mail app in Windows 8. You need to use

RichEditBox (UWP) ignores font and foreground when setting Rtf text

半世苍凉 提交于 2019-12-11 06:35:38
问题 I'm working with a RichEditBox and I'm having some problems saving and restoring the Rtf text. Here's a sample Rtf text I've exported, as you can see there are the different foreground colors and font families saved correctly (I've manually indented it to make it easier to read) : {\rtf1\fbidis\ansi\ansicpg1252\deff0\nouicompat\deflang1040 {\fonttbl{\f0\fnil\fcharset0 Segoe UI;} {\f1\fnil\fcharset0 Brush Script MT;} {\f2\fnil\fcharset0 Impact;} {\f3\fnil Segoe UI;}} {\colortbl ;\red9\green105

MarketplaceSearchTask for windows phone 8.1

拥有回忆 提交于 2019-12-11 06:31:29
问题 I have been searching for Market Place Search task for windows phone 8.1 from last 2 days and I got answer from below link : Are there any class in WinRT as MarketPlaceReviewTask in WP? I tried with given solution but It is not working as suggested. So, Can any one help me with market search functionality on windows phone 8.1? Same functionality is available in silverlight phone. 回答1: In Windows Phone 8.1, You can use Launcher to Launch a special URI: await Windows.System.Launcher

Is it possible to send an email to a specific recipient through Share Contract?

﹥>﹥吖頭↗ 提交于 2019-12-11 06:28:46
问题 I'm trying to send an email from a Metro application (js or c#, doesn't matter) Is Share Contract the way to go? As far as I can tell you can't specify the email's recipient through the Share contract. 回答1: You are correct. There is no way. You could try constructing a mailto Uri and launching it 回答2: This is correct. The share contract is also available for other apps, i.e. Tweetro, which do not use an email address, therefore the user must type in an email address per hand. A mailto Uri

Webview always on top (Metro app)

时光总嘲笑我的痴心妄想 提交于 2019-12-11 06:24:11
问题 I've noticed that whenever you have a WebView on your screen, it will be the top-most element of the UI. Is there a way to set a z-index? 回答1: There is no way to set z-index or anything similar, WebView is always on top of the XAML ("Airspace" issue). You have to hide web view if new content completely hides WebView or use WebViewBrush control. http://blogs.msdn.com/b/wsdevsol/archive/2012/10/18/nine-things-you-need-to-know-about-webview.aspx#AN2 http://blogs.msdn.com/b/priozersk/archive/2012

Thread safety of the reference count of a C++/CX WinRT pointer

房东的猫 提交于 2019-12-11 06:21:15
问题 I was under the impression that the reference count to WinRT objects was thread safe, given the use case. But I've run into a bug that I don't know any other way to explain. For example, the following code crashes quite quickly: ref class C sealed { public: C() { } virtual ~C() {} }; [Windows::Foundation::Metadata::WebHostHidden] public ref class MainPage sealed { public: MainPage() : _latest(nullptr) { InitializeComponent(); Windows::System::Threading::ThreadPool::RunAsync( ref new Windows:

How to bind view model to a UserControl in MVVMCROSS?

℡╲_俬逩灬. 提交于 2019-12-11 06:16:02
问题 I am using the excellent Mvvmcross and Ninja Coder for Mvvmcross for building a cross platform app. For my windows store app I have created a view and a view model using Ninja coder. I have also created a UserControl which will be referenced in the view. Hence I need to bind the same viewmodel to the User control also. I have been trying to set the Data context of the user control to the singleton instance of viewmodel. I have set the data context of the user control like below. public sealed