windows-runtime

How to show basic HTML Windows8 Metro style TextBlock?

五迷三道 提交于 2019-12-05 08:27:26
I have an html page that only contains <p> , <strong> , <br /> and <a> tags. I want to show this content in a XAML TextBlock in Windows 8. Is there any way to show that content in a TextBlock without losing the structure (e.g. paragraphs)? I don't want to use WebView because WebView can not be transparent. I am developing a open source Windows 8 Metro RSS Reader app and I used HtmlUtilities.ConvertToText You can see the source code implementation here http://metrorssreader.codeplex.com/SourceControl/changeset/view/17913#265003 If you want to do it in XAMl, just add a converter. public sealed

Locked screen in windows 8 WinRT

折月煮酒 提交于 2019-12-05 08:18:00
When my app is running in Windows 8 WINRT can I prevent the OS to go to locked screen/sleep mode? You can use the DisplayRequest class to indicate that you are busy playing back something that requires the display to stay active and un-dimmed. A good how-to article with sample code is available here . Don't use it frivolously, it is quite detrimental to power consumption. Good odds that the Store will reject your app if you use it for no obvious benefit to the user. You cannot prevent OS to go to lock screen/sleep/shut-down etc. If you want your application to run behind the scenes, you may

Making ScrollViewer's ScrollBar always visible through overriding or styling

泄露秘密 提交于 2019-12-05 08:02:34
I'm trying to make the ScrollBar for the ScrollViewer to be always visible so it doesn't only appear when I try to scroll the text view and so the user knows that there is someting more to see. At first, for some reason, I thought that I just have to change the color which needed brush overriding, but in reality, the ScrollBar is fading in and fading out, so either the ScrollViewer's or ScrollBar's template needs to be changed. I found the ScrollViewer's template which I have just placed in the App.Resources section, but I don't know how to edit it so the ScrollBar is just visible all the time

Get Albumart in .mp3 file for Windows Store App

拥有回忆 提交于 2019-12-05 07:30:32
How can i get the AlbumArt image in the mp3 file? I am developing Windows Store app with c#. MusicProperties class gives me Album name artist name vs. But it cant give me albumart. Xyroid Check out MSDN sample to show thumbnail of any file. It also consists how to retrieve the album art. File and folder thumbnail sample If you want to save the album art check out How to store save Thumbnail image in device in windows 8 metro apps c# UPDATE 1 MediaFile is StorageFile . ImageControl is <Image ... /> using (StorageItemThumbnail thumbnail = await MediaFile.GetThumbnailAsync(ThumbnailMode.MusicView

Saving images locally in windows phone 8.1 universal app

[亡魂溺海] 提交于 2019-12-05 07:27:11
问题 I want to download and save(cache) images locally in windows phone 8.1 universal app. so that if Phone is offline I can show users images(avatars) in ListView. What is the best way of saving images to local storage(should I use local storage or I use sqlite as i am using sqlite to store user's other information)? How can I save (download) images to local store? Thanks! 回答1: There's a great extension by Q42 in their Q42.WinRT framework called ImageExtensions.cs You use it on normal Image

Is it possible to set a subject to the mail app in Windows 8 metro application, if I am using share contract and sharing files?

血红的双手。 提交于 2019-12-05 07:23:36
First of all, I am sharing the content from my windows 8 metro application to another app (for example Mailto app) so: Now I am sharing files to mailto app using share contract and sharing files from my application, I wanted to know if: - Can I set the subject to the mailto app to which I am sharing files as an attachement to that mailto app, if so please let me know how can I do this? If not, please let me know what is the work around? As of now, it's not possible. Windows 8 recently introduced a new API called protocol activation. With Protocol activation, you can launch other windows 8 apps

How to implement IAsyncOperationWithProgress

痴心易碎 提交于 2019-12-05 07:18:30
I'm porting some custom .NET streams to WINRT. Language is C#. Is there some example implementation of IAsyncOperationWithProgress? Since Methods ReadAsync, WriteAsync from Windows.Storage.Streams require them. Custom WinRT streams implementations are welcomed also. I found some C examples using create_async, but i'm looking to do this in C#, and i cannot find create_async in the Metro framework. Thanks in advance For C#, you should check out this //build talk on async programming . If you're using high level C++, you should look at this article about how to do asynchronous operations in the

Does Windows 8 Compile JavaScript?

痞子三分冷 提交于 2019-12-05 07:10:58
It is exciting that Windows 8 is supporting so many languages for Metro App development. One that especially interested me was the HTML5/CSS/JavaScript. What I don't understand, is this code going to get compiled in a sort of executable (like the C#, VB, and C++ option), or would my app basically be running in IE as an actual web page? Yes. Javascript is executed on Windows 8 by the Chakra engine. Similar to the .NET just-in-time compiler, it translates javascript to optimized machine code. Also the approach taken by Google's V8 and Mozilla's TraceMonkey engines. Some background info is here .

How to place an XAML usercontrol in a grid

空扰寡人 提交于 2019-12-05 06:57:59
I have the following main.xaml and usercontrol. I need to place several times the user control on the 2nd row, 2nd column of the grid, By using visual studio it wont allow to drag and drop the user control, so I suppose I have to do it by code, I just dont know how MainPage.xaml <Grid HorizontalAlignment="Left" Height="768" VerticalAlignment="Top" Width="1366" x:Name="grid" Background="Black"> <Grid.RowDefinitions> <RowDefinition Height="150"/> <RowDefinition/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition Width="250"/> </Grid.ColumnDefinitions> <Border

What does version 255.255.255.255 for winmd files indicate?

我们两清 提交于 2019-12-05 06:50:21
I noticed that most (all?) .winmd files have a version of 255.255.255.255 like: Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null Metro apps have a reference to such assemblies with this version number. Further the Windows.winmd itself references: mscorlib, Version=255.255.255.255, Culture=neutral, PublicKeyToken=b77a5c561934e089 However, an assembly with this version number does not exist, as far as I know. Does this version number have a special meaning? Is there any documentation for this? ECMA 335 assemblies need to have a version number. But the windows runtime type