microsoft-metro

Start metro app (camera) from WPF application

感情迁移 提交于 2019-12-06 04:37:49
I have a ordinary .net 4 WPF application which is supposed to be run on a Windows 8.1 tablet. From this application I would like to start the native Metro camera app, if it is available. I´ve tried looking for answers, but it seems to require a Windows app to start metro apps. So is it even possible? Thank you :) Have a look at this article: http://winaero.com/blog/exclusive-how-to-start-a-modern-app-from-desktop-without-going-to-the-metro-start-screen/ Basically, you need to run: explorer shell:AppsFolder\Microsoft.MoCamera_cw5n1h2txyewy!Microsoft.Camera e.g. Use: Process.Start("explorer", @

How to store save Thumbnail image in device in windows 8 metro apps c#

泄露秘密 提交于 2019-12-06 04:21:40
问题 I am creating Thumbnail and showing in frame by using this code Platform -> windows 8 metro apps using c# http://code.msdn.microsoft.com/windowsapps/File-and-folder-thumbnail-1d530e5d in windows 8 metro apps using c#. i need to save or Store ( in device )the thumbnail image which i am creating at run time. in DisplayResult() of constants.cs class file i need to save that image in device how to achieve this . please give me some idea or example i am very new in mobile and never worked on Image

GetFilesAsync stops working

与世无争的帅哥 提交于 2019-12-06 04:16:12
问题 I've this piece of code public static class Storage { public async static Task<bool> Exists(string filename) { var folder = await Package.Current.InstalledLocation.GetFolderAsync("Assets"); var _files= await folder.GetFilesAsync(CommonFileQuery.OrderByName).AsTask().ConfigureAwait(false); var file = _files.FirstOrDefault(x => x.Name == filename); return file != null; } } and calling it from my Windows 8 Store application; this.IconExists = this.Game != null && Storage.Exists(this.IconName)

How the Deployment.Current.Dispatcher.BeginInvoke work in windows store app?

可紊 提交于 2019-12-06 03:30:57
i got experience with windows phone 8 and i am using WCF data services, i am able to update my record successfully with following code : public void UpdateJob1(EquipBooking equipBooking) { this._context.UpdateObject(equipBooking); this._context.BeginSaveChanges(OnChangesSaved, this._context); } private void OnChangesSaved(IAsyncResult result) { bool errorFound = false; Deployment.Current.Dispatcher.BeginInvoke(() => { this._context = result.AsyncState as THA001_devEntities; try { // Complete the save changes operation. this._context.EndSaveChanges(result); } catch (DataServiceRequestException

Detecting a scroll event in GridView (Windows 8)

孤者浪人 提交于 2019-12-06 03:25:50
How do we detect a scrolling event in GridView (like ViewChanged on ScrollViewer) on somethig like the default GridView template sample app? I'd like to replicate the effect that the netflix App does on the left red strip. I tried putting the GridView inside a scrollviewer, but I've been unsuccessful at stretching it to fill the screen for different resolutions. Update: I intend to use this with VariableGrid control that's on NuGet - though it's not an official control, it inherits GridView The best way to do this seems that you can read through the components of the control, and assign events

Center popup in XAML

倖福魔咒の 提交于 2019-12-06 02:55:54
问题 I have created a Popup by using the following code, but I can not figure out how to center it I tried to automatically change the margin on runtime, but I could not figure out how to do it, but do anybody has an idea of how to center the popup? It does not has a standard-dimension cause I need to globalize my program <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Name="MainGrid"> <Popup x:Uid="LoginPopup" IsOpen="True" Name="LoginPopup"> <Grid> <Grid.RowDefinitions>

Finding out installed Metro applications on a machine

我的梦境 提交于 2019-12-06 02:30:13
问题 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 回答1: I wish I could comment...Is this an option? IEnumerable<Windows.ApplicationModel.Package> packages = (IEnumerable<Windows

How to append array of bytes to the existed StorageFile?

喜你入骨 提交于 2019-12-06 01:49:13
问题 I need to write to a file data by chunks of bytes consequentially (in my Metro app) and there is a class FileIO with methods AppendTextAsync and WriteBytesAsync but without needed AppendBytesAsync so how can I append an array of bytes to a StorageFile ? 回答1: This code seems to work for me: String s = "hello"; Byte[] bytes = Encoding.UTF8.GetBytes(s); using (Stream f = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync ("hello.txt", CreationCollisionOption.OpenIfExists)) { f

Is FluidMoveBehavior available?

你。 提交于 2019-12-06 01:23:43
I have calls to Grid.SetRow and Grid.SetColumn in my code which I'm trying to animate. According to the answer at http://social.msdn.microsoft.com/Forums/en-CA/wpf/thread/257779f7-b459-43fc-a4a1-f24641c50e09 , it is recommended to make use of FluidMoveBehavior, but it doesn't look like this is available for Windows 8. What are my options for animating the children of a Grid when their positions change? I'm basically looking for a way to achieve linear transition. There is a new built-in feature called Transitions that can be used, here is an intro . Try adding a RepositionThemeTransition to

How to give a “Empty ListView Message” when there is no data source

只愿长相守 提交于 2019-12-06 01:23:13
问题 My application have a ListView with GridLayout. I am now trying to introduce ListView groups into my application. Say, the data source would usually have Group1, Group2 and Group3. I would like to display all 3 groups all the time regardless there is element in it or not. When there is no element in a group, I want to display a "empty group" message under the group title. I think the default way that WinRT handles it is not to display the empty group and it makes a lot of sense in many