microsoft-metro

Local database storage for WinRT/Metro applications [closed]

坚强是说给别人听的谎言 提交于 2019-12-09 02:16:08
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I am trying to find an API within WinRT that will allow me to create a local database that can be used to store data for an occasionally connected application. I am looking for something like SQL Compact Edition. I have seen various messages on various boards indicating that there

How to tell if JS Windows8 metro app is visible or not

こ雲淡風輕ζ 提交于 2019-12-09 01:49:02
问题 I am trying to create an app which does some work when it becomes visible, and does other work when it goes away. This is typically accomplished with the page visibility api (http://css.dzone.com/articles/using-html5s-pagevisibility) but this is not currently supported in windows 8: http://msdn.microsoft.com/en-us/library/ie/hh673553(v=vs.85).aspx There are callbacks onactivated and oncheckpoint but these are for the process lifecycle and are not necessarily related to app visibility.

Custom User Agent for a WebView

喜欢而已 提交于 2019-12-08 19:34:31
问题 can I set a custom User Agent for a WebView ? I need to show mobile style of websites. 回答1: It's easy to do: string ua = "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X)" + "AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25"; var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, new Uri(url)); httpRequestMessage.Headers.Add("User-Agent",ua); webView1.NavigateWithHttpRequestMessage(hrm); 回答2: Per this MSDN Forum posting you cannot. Could you host

Metro (XAML/C#): detect installation and/or first run

不问归期 提交于 2019-12-08 18:30:32
问题 When creating Metro applications in XAML/C#, how do I detect when the application is first installed or run for the first time since installation (or potentially upgrade)? I need to use this opportunity to ensure that my database schema is correct and potentially synchronise some base data. I had hoped that I could pick this up from the LaunchActivatedEventArgs within the OnLaunched method, but there does not seem to be a valid value for the Kind or PreviousExecutionState that I can use.

SQLite with Metro - Unable to load sqlite3.dll

和自甴很熟 提交于 2019-12-08 18:08:30
I am not able to create a database using SQLite with my Metro application. Description: I continue to receive a runtime exception on a failure to load SQLite3.dll. Observation: I observed that the database directory never gets created in the app package's LocalState directory. After observing this, I literally implemented file path creation at runtime and dropped the sqlite3.dll in the intended location. Yet, I still receive an exception on failed to load SQLite3.dll. My CRUD code that leverages SQLite compiles fine. SQLite dependencies (packages.config, SQLite.cs, and sqlite3.dll) are located

Suspend camera when user switches away from app, and resume camera when user switches back to app

守給你的承諾、 提交于 2019-12-08 17:03:36
Currently, I would like to suspend my camera when user switches away from my app, and resume camera when user switches back to app I am referring to Application lifecycle (Windows Store apps) (Windows) However, Suspending | suspending event isn't being triggered immediately once the user switches away from my app. You need to wait for few seconds (Or it will not trigger at all if OS decides not to do so). So, how I can know, when I should run my camera suspension code when user switches away from my app. If I referring to Media capture using capture device sample , they are using Windows.Media

ResourceMap not found error when referencing a resource file within a portable class library

半城伤御伤魂 提交于 2019-12-08 16:39:27
问题 The problem I am facing has as follows: I have developed a portable class library to encapsulate a service connection. Inside this class library there is a Resources.resw file containing strings. These strings are called only by methods of the class library (for example to override ToString() methods). As I said this is a portable class library. If I reference it as a dll, or even as a project inside another solution, it gets built and compiles correctly. Then I make a call using a method of

Microsoft Advertising SDK for Windows 8 RTM causes Access Denied Error

巧了我就是萌 提交于 2019-12-08 15:27:25
问题 Note these things: I have Windows 8 RTM. I have Visual Studio 2012 RTM. I have Microsoft Advertising SDK RTM. All I do is: Add a reference to it. The Error: System.UnauthorizedAccessException Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler

VariableSizedWrapGrid and WrapGrid children size measuring

时光总嘲笑我的痴心妄想 提交于 2019-12-08 15:09:14
问题 Both VariableSizedWrapGrid and WrapGrid have strange measuring - they measure all children based on the first item. Because of that, the following XAML will clip the third item. <VariableSizedWrapGrid Orientation="Horizontal"> <Rectangle Width="50" Height="100" Margin="5" Fill="Blue" /> <Rectangle Width="50" Height="50" Margin="5" Fill="Red" /> <Rectangle Width="50" Height="150" Margin="5" Fill="Green" /> <Rectangle Width="50" Height="50" Margin="5" Fill="Red" /> <Rectangle Width="50" Height=

Crop image with rectangle

时间秒杀一切 提交于 2019-12-08 13:37:31
问题 I have a Image and I want crop it by using a rectangle, code below is the code I put a image and draw a rectangle at middle of the image: MainPage.Xaml: <Canvas x:Name="canvas" HorizontalAlignment="Center" VerticalAlignment="Center" Width="340" Height="480" Background="Blue"> <Image x:Name="photo" HorizontalAlignment="Center" VerticalAlignment="Center" ManipulationMode="All"> <Image.RenderTransform> <CompositeTransform/> </Image.RenderTransform> </Image> <Path Stroke="Black" StrokeThickness=