microsoft-metro

Finding out installed Metro applications on a machine

安稳与你 提交于 2019-12-04 07:03:37
I am trying to write a piece of code in C# to find all installed Metro Applications on a machine. I came across the following post Get a list of metro apps and launch them in Windows 8 using PowerShell which explains obtaining this from the system registry. Is this the only reliable way to obtain the list? Does anyone know of any other ways? Thanks in advance I wish I could comment...Is this an option? IEnumerable<Windows.ApplicationModel.Package> packages = (IEnumerable<Windows.ApplicationModel.Package>)packageManager.FindPackagesForUser(""); http://msdn.microsoft.com/en-us/library/windows

Simulating flipping live tiles in html

无人久伴 提交于 2019-12-04 06:06:41
I need to code some html square "live tiles" that flip between 4 states periodically. Basically what I need is what this plug-in does http://www.drewgreenwell.com/projects/metrojs , but between 4 states, not just 2. Is there a definitive API/plug-in that allows live tile management in html/jquery sites? I'm not building a Windows 8 app, I'm just trying to simulate Live Tiles flipping in Html, and hopefully have it work in all major browsers. Thanks. In the end, it seems that Drew's plug-in does support multiple tile states, he provided a couple of samples. Sample 1 and Sample 2 . It seems to

WinRT Loading an Image into a Byte array

走远了吗. 提交于 2019-12-04 05:28:47
问题 I'm trying to learn how to interact with the some of the WinRT (Metro) objects for images. Basically, I'm working towards creating a "GetPixel" and "SetPixel" method that's easy to use (similiar to what's in System.Drawing.Bitmap that can't be used in Metro apps). For testing, I created a "Bitmap" class. It loads based off of a IRandomAccessStream that I get from the Metro file picker control. I'm able to load the pixel data into a Byte array and then create a BitmapImage from it that renders

Will Windows 8 Metro support managed c++/cli

青春壹個敷衍的年華 提交于 2019-12-04 03:36:39
问题 I can't seem to find an answer to this question anywhere, but will metro support managed c++ ?? Right now in Visual Studios 2012 RC it does not (in Metro only). I have some frameworks written in c++/cli and wanted to port them to Metro. I know c++/cx is similar, but my c++/cli objects derive from ones written in C# and it would suck to have to rewrite that part of my system (but ok if I do, I just need to know where to go from here). If there are plans to support it when Windows 8 actually

JavaScript runtime error: Unable to add dynamic content

心不动则不痛 提交于 2019-12-04 03:18:04
问题 I'm making a javascript metro app and have some code like this: <script> document.writeln(foo());//this line is trouble </script> and when I tried to run, it gave me a rather long error: Unhandled exception at line 20, column 9 in ms-appx://a375ffac-3b69-475a-bd53-ee3c1ccf4c4e/default.html 0x800c001c - JavaScript runtime error: Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the

windows 8 xaml inline hyperlink

随声附和 提交于 2019-12-04 03:12:19
How do I create properly formatted hyperlinks in Windows Store Apps in XAML? I tried creating an inline hyperlink and want to style it with a staticresource: <RichTextBlock Style="{StaticResource PageHeaderTextStyle}" Grid.ColumnSpan="2"> <Paragraph> <Run>"A sentence with inline text "</Run> <InlineUIContainer> <HyperlinkButton Background="Yellow"> my link </HyperlinkButton> </InlineUIContainer> <Run>... some more text</Run> </Paragraph> </RichTextBlock> i get the following where the hyperlink is not aligned with the rest of the sentence: Well, I tried this to no avail: <RichTextBlock FontSize

Using ScrollViewer for image pinch-zoom, keeps snapping left on pan

感情迁移 提交于 2019-12-04 02:50:38
I am trying to use a XAML ScrollViewer to 'cheaply' add pinch-zooming to an image. The issue however is that when panning around the image, it keeps snapping to the very left. If I slide it right, it looks fine, but the second I release the image, it snaps back to the left. This problem only persists horizontally - for vertical panning, it works fine. I abstracted this to the most simple test case, and it persists. My XAML code is as follows: <ScrollViewer> <Image Source="http://i.imgur.com/1WlGT.jpg" /> </ScrollViewer> Any help is appreciated. I've resolved this. The issue is you have to

Drop-down Selection Control - Windows 8 Metro - XAML

心已入冬 提交于 2019-12-04 01:59:11
I want the dropdowns like in the pictures below: I dont know how I get them. I suppose that these are some kind of comboboxes but I am not sure. Can anyone help me and provide the xaml code?! Thanks. I suppose you are looking for Combo box : Windows 8 store controls list (MSDN) . To use: <ComboBox x:Name="comboBox1" SelectionChanged="ComboBox_SelectionChanged" Width="100"> <x:String>Item 1</x:String> <x:String>Item 2</x:String> <x:String>Item 3</x:String> </ComboBox> you would have to use Popup. Below link might help you http://rahulpnath.com/blog/windows-8-series-drop-down-button/ These look

Store user data in Windows 8 metro app

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 00:37:30
I am learning how to develop Windows 8 Metro style apps but i couldn't found a way to store user data in SQL Server for example. What could i use or how to store user data. You cannot access local "desktop services" from the Metro app. So you will not be able to communicate with a local SQL Server. You can use online services that store your information or you can use local storage. Take a look at: How to store and retrieve local application data ApplicationData sample That question is also debated here and here You can use SQLite for Windows Runtime Here is a blog post explaining how to use

How to print the contents of a TextBox

社会主义新天地 提交于 2019-12-03 23:55:18
问题 How do I print the contents of a TextBox in metro apps? I have read this quickstart guide on MSDN and many online tutorials, but they are very complicated and do not work with TextBox controls, only RichTextBox controls . How do we print from a TextBox control in a metro app? Is it even possible? How? 回答1: UPDATE 1 I have created a helper class which simplifies printing text box content. You can add helper class via NuGet. If you want to enhance my existing helper class, fork on GitHub Here I