microsoft-metro

How to have user prompt dialogs in Windows 8 metro apps?

北城余情 提交于 2019-12-06 01:12:54
I would like to get some user inputs for my app like Name, DOB, etc from a modal window for this I need a dialog to be displayed which would contain the textboxes and other controls. Normally in WinForms/WPF I would create a class inherited from the Form/Window class and use the Show/ShowDialog method to present the form to the user How do I achieve this behavior in Windows 8 metro apps using XAML/C# ? I have looked at the MessageDialog class under the Windows.UI.Popups namespace but its for showing only message like the classic MessageBox. I have looked at another CoreWindowFlyout class and

Snapping ScrollViewer in Windows 8 Metro in Wide screens not snapping to the last item

可紊 提交于 2019-12-05 23:38:40
I have enabled snapping points in my app inside a ScrollViewer, as described in this question: Enabling ScrollViewer HorizontalSnapPoints with bindable collection The problem that I am having is that as I am trying my app in a full HD monitor (1920x1080) and each item is 1400 px width. By the time that I have the scroll snapped in the item #n-1 I can't scroll to the last one, because it doesn't snap... The hack I had to do was to add a "fake" item, transparent at the end, so I can scroll to the last item of my collection: <Page.Resources> <Style x:Key="ItemsControlStyle" TargetType=

How to make Windows 8 desktop apps shown in Metro UI (like Task Manager)?

妖精的绣舞 提交于 2019-12-05 21:56:39
Recently I have noticed that Windows 8 Task Manager can be shown in Metro UI. The requirement is that you must set it always on top (through "Options -> Always on top" menu). After setting always on top, you can launch Task Manager in Desktop, switch to Metro, you can see that Task Manager is shown in Metro. Or you can directly launch Task Manager in Metro (by pressing Ctrl+Shift+Esc or Ctrl+Alt+Delete). I just wanna know how to achieve this in other apps? Other desktop apps don't have this behavior if they are always on top. Is Windows 8 Task Manager is a special app? Maybe it is a mixture of

MessageDialog - needs to wait for user input

早过忘川 提交于 2019-12-05 21:13:34
I have a ViewModel which instantiates an event in a synchronous method. The event signals to the UI that we need a "Yes" or "No" answer from the user before continuing. I am trying to display a MessageDialog and wait until the user provides an answer - Yes or No. I am having a difficult time doing this. I currently get an UnauthorizedAccessException when trying to do this. Here's a look at the code in the UI: async Task<bool> Instance_SwitchConfirmation(string question) { MessageDialog md = new MessageDialog(question); md.Commands.Add(new UICommand("Yes", CommandInvokedHandler)); md.Commands

List of assemblies in the .NET for Windows 8 profile

非 Y 不嫁゛ 提交于 2019-12-05 19:27:34
I am looking for the list of assemblies in the ".NET for Windows 8" profile. This is the profile used for WIndows 8 Metro-style applications, and like Silverlight doesn't use the full .NET framework. .NET for Metro style apps — list of namespaces Converting your existing .NET Framework code — changes to the various APIs. I don't see any list currently... and WinRT is expected to change alot till the official release in 2012... current information about assemblies/not available in the "Metro/WinRT Client profile": http://blogs.microsoft.co.il/blogs/sasha/archive/2011/09/17/metro-net-framework

Windows 8 - Custom Live Tile

会有一股神秘感。 提交于 2019-12-05 19:24:42
We are developing an app for Windows 8 in C#. Our app involves drawings the user creates, and we'd like to incorporate their drawings into the live tile. I have found examples of setting text and pictures as your app's live tile. Is there a way to do custom stuff to render lines, etc.? Or is the only way to do what we need by rendering a PNG out to our app's AppData directory? You will need to render a PNG or JPG into the apps data directory. The live tile has a fixed number of pre-defined templates and outside of that all you can do is pick the template with a full-tile image and supply your

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

落花浮王杯 提交于 2019-12-05 19:24:23
问题 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

Reuse animations in Windows 8

允我心安 提交于 2019-12-05 19:16:38
I am building Windows Store Application (Winrt, Metro, Windows 8 app). I try give images in gridview animation: after image is loaded from web and opened it populates its cell. I have storyboard for that: <Storyboard x:Name="PopupImageStoryboard"> <DoubleAnimationUsingKeyFrames EnableDependentAnimation="True" Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="image"> <EasingDoubleKeyFrame KeyTime="0" Value="100"/> <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="240"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames EnableDependentAnimation="True"

winrt: load local html and its resources in webview

旧时模样 提交于 2019-12-05 18:38:45
I'm currently developing a WinRT app where I load local HTML files from Windows.Storage.ApplicationData.Current.LocalFolder . I like to know what would be the best way to load assets like Images, Audio, Video, CSS, JavaScripts, etc, that are embedded in the HTML file. Currently, I'm writing these files in the Windows.ApplicationModel.Package.Current.InstalledLocation but this wont be accessible anymore once the application had been deployed from the store or by installing the AppPackage through Windows PowerShell, unless you change the ownership of the "Program Files/WindowsApps" folder to the

audio capture in metro apps

坚强是说给别人听的谎言 提交于 2019-12-05 18:19:59
I need to perform low-level audio capture in my Windows 8 Metro-style app. I guess I need to use the IAudioClient interface, but how to get that interface? Microsoft says "A client obtains a reference to an IAudioClient interface for an audio endpoint device by using one of the techniques described in IMMDevice Interface.." http://msdn.microsoft.com/en-us/library/windows/desktop/dd370865(v=vs.85).aspx but IMMDevice interface is not supported for Metro-style apps. How does one get an IAudioClient interface ? I got an answer from the MSDN forums: Platform::String^ id = Windows::Media::Devices: