windows-runtime

Choosing a certificate for a Windows Store application via the package.appxmanifest

我是研究僧i 提交于 2020-01-06 02:12:49
问题 So that an WinRT application can be internally distributed via Intune I need to attach a certificate as per http://msdn.microsoft.com/en-us/library/windows/apps/br230260(v=vs.110).aspx I go to the package.appxmanifest screen, click choose certificate - > configure certificate - > select from file. I double click on the relevant certificate, and type the password. I then get the error message "The Manifest Designer could not import the certificate. The certificate you selected is not valid for

Audio sample adding to a video using Sink Writer in Windows Media Foundation

Deadly 提交于 2020-01-06 02:08:05
问题 I can write a video file using images which I learned with this sample here. It uses IMFSample and IMFSinkWriter . Now I want to add audio to it. Suppose there is Audio.wma file and I want this audio to be written in that video file. But cannot figure out how to do that in this sample. Things like input & output type setup, IMFSample creation for audio buffer etc. It would be a great if someone could show me how to add audio to a video file using sink writer. 回答1: Media Foundation is great to

Window Phone 8 submit post form with an image

只谈情不闲聊 提交于 2020-01-06 01:29:38
问题 I am working on window phone 8.0 and I have a problem when trying to submit a post request from mobile phone to a website. The input named "file" and it accepts only image file. <form action="upmeme" method="post" enctype="multipart/form-data"> <input type="file" class="file" name="file" id="file"><br> <input type="submit" class="submit" name="submit" value="Submit"> </form> or you can visite here: this website I used PhotoPicker to choose the photo from libary and keep it into "photo" Stream

Launch 2 SMS Compose tasks in Windows Phone 8.1 RT App

戏子无情 提交于 2020-01-05 20:48:30
问题 I have a button in my Windows Phone 8.1 RT app. When the user clicks the button, 2 SMS are supposed to be sent to two different users. I can launch one SMS Task using the following code var message = new ChatMessage(); message.Recipients.Add("1231233"); message.Body = "This is a text message from an app!"; await ChatMessageManager.ShowComposeSmsMessageAsync(message); But when I do this multiple times, the app crashes. The Task complete event fires on task launch, is there a way to know if the

Office 365 API - Azure Active Directory bring user's thumbnail Failed

情到浓时终转凉″ 提交于 2020-01-05 12:49:45
问题 I'm using the following code from this sample : here to get the user's thumbnail of there's account on office 365 tenant into windows 8.1 project XAML/c# try { using (var dssr = await user.ThumbnailPhoto.DownloadAsync()) { var stream = dssr.Stream; var buffer = new byte[stream.Length]; await stream.ReadAsync(buffer, 0, (int) stream.Length); ProfileImage = buffer; } } catch (Exception ex) { Debug.WriteLine(ex); } However each time I try to bring user's thumbnail photo, I get the following

WinRT XAML Databinding: How to bind to a property to the parent's data context when binding within an ItemTemplate?

白昼怎懂夜的黑 提交于 2020-01-05 08:13:30
问题 I have a GridView for which I set the data context programmatically to the view model instance. The GridView's ItemsSource is bound to an observable collection (PagesToRead) which is a property on the view model. Within the GridView.ItemTemplate , binding goes against the observable collection in the ItemsSource , but I want to bind the StackPanel's Background element to a different property on the view model. I'm looking for the magic <Background="{Binding Path=BackgroundColor, Source=???}">

how to create gridview from dictionary

徘徊边缘 提交于 2020-01-05 07:09:16
问题 I have a dictionary where key is a String and element is a List I want to create a group from every key with elements from element. But I don`t know how to make it <Page.Resources> <!-- Collection of grouped items displayed by this page, bound to a subset of the complete item list because items in groups cannot be virtualized --> <CollectionViewSource x:Name="groupedItemsViewSource" IsSourceGrouped="true" /> </Page.Resources> <GridView ItemsSource="{Binding Source={StaticResource

Can a metro app open the default browser without opening a page?

戏子无情 提交于 2020-01-05 04:57:50
问题 On button click I want to open the default metro browser (usually IE) without opening a new tab/page, just open the browser, If it is already running then just switch to it as it is to it's current state. Is there a way to do that? 回答1: This is just something to try, and may or may not work in your scenario: If you know the url that is open in the browser, your Windows Store app could launch that same url with the launcher. In my app, when I launch the same url multiple times, IE will pop up

opening the appbar in metro style apps using binding property

≯℡__Kan透↙ 提交于 2020-01-05 04:36:23
问题 My main page has the appbar and it is shared across different pages. I wrote the following code to open the appbar on the click of a gridview item. XAML <AppBar Opened="AppBar_Opened" IsOpen="{Binding IsAppBarOpen}"> Back end private void Clock_SelectionChanged(object sender, SelectionChangedEventArgs e) { App.ViewModel.SelectedClock = (Clock)ThemeGridView.SelectedItem; App.WorldViewModel.IsAppBarOpen = true; } private void ThemeGridView_ItemClick(object sender, ItemClickEventArgs e) { App

How to subscribe to events raised within a Windows Runtime Component in C++/CX?

☆樱花仙子☆ 提交于 2020-01-05 02:54:11
问题 I have an class in a Windows Runtime Component (written in C#) that raises events. I cannot work out how to subscribe to these events in a C++/CX app that references the component. The C# code (in the Windows Runtime Component): public sealed class Messenger { private EventRegistrationTokenTable<EventHandler<MessageReceivedEventArgs>> messageReceivedTokenTable; public event EventHandler<MessageReceivedEventArgs> MessageReceived { add { return EventRegistrationTokenTable<EventHandler