windows-8

Can't read the text file in metro apps?

跟風遠走 提交于 2019-12-13 00:27:24
问题 I can read the text file for first time. when i try to read the same text file next time, it quit the function and return null value. static string configData = ""; async public void readtextFile(string folder, string file) { StorageFolder storageFolder = await Package.Current.InstalledLocation.GetFolderAsync(folder); StorageFile storageFile = await storageFolder.GetFileAsync(file); configData = await FileIO.ReadTextAsync(storageFile); } Please suggest me, how to resolve this issue.. Thanks

Alternative to InkPresenter?

眉间皱痕 提交于 2019-12-13 00:27:11
问题 I have an app in Windows 8 which is a hand writing based. Im trying to port it to Windows Phone 8. But there are only 3 Inking classes available for WP8 and no Inkmanager class. Can we use a canvas instead of InkPresenter. Are all functions of stroke available for it. I tried the following code private void MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { InkCanvas.CaptureMouse(); StylusPointCollection MyStylusPointCollection = new StylusPointCollection();

TwoWay Binding Not Updating Target - Metro App

坚强是说给别人听的谎言 提交于 2019-12-13 00:23:51
问题 I'm building a Metro App using VS 2012 and the Windows 8 SDK. In the app, I have this class (with a corresponding struct) // Parameter data structure for tools public struct ToolParameter { public string Title { get; set; } public Object Value { get; set; } public string Description { get; set; } } // Tool that will be used to execute something on phone public class Tool { public string Title{ get; set; } public ObservableCollection<ToolParameter> Parameters { get; set; } public string

How do I launch a Windows Store application programmatically?

时间秒杀一切 提交于 2019-12-13 00:23:21
问题 I just built one of the project templates Visual Studio 2012 offers (the 'Split App (XAML)' template accessible via Templates -> Other Languages -> Visual C# -> Windows Store in the 'New Project' dialog). I can execute the application from Visual Studio 2012, and I can launch it from the Windows 8 start screen - but if I attempt to launch the generated executable directly (e.g. via the Windows explorer or from a command shell), a full-screen error message is printed saying "This app can't run

manipulationdelta for popup window - XAML Windows 8

房东的猫 提交于 2019-12-12 22:33:01
问题 I am trying to put floating popup windows on screen. I want user to be able to move that popup window anywhere on the screen. And so I am using: <Popup x:Name="myPopup" Grid.Row="0" Grid.RowSpan="2" Margin="0, 0, 0, 0" ManipulationMode="All" ManipulationDelta="PopupManipulationDelta" IsLightDismissEnabled="False" Visibility="Collapsed" IsOpen="false"> code behind: private void PopupManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e) { var ct = (CompositeTransform

Compiling an Win8 app from a Win8 Metro app (and possibly run it sandboxed)

元气小坏坏 提交于 2019-12-12 22:26:23
问题 I have a bit of a weird question. Is is possible to maybe CodeDom or Emit compile a Win8 Metro app (.NET or HTML5/JS) from within a Win8 Metro app and then run it (not install it, just run it until user closes it/stops it)? I guess it is sort of a MEF-ish need. I haven't been able to find any references to this kind of need. I've tried to wade through what Rosetta is/does, but haven't gotten very far in understanding how it is better/different than CodeDom or Emit and if it could even be what

Firebreath plugin not loading in IE 10

时光毁灭记忆、已成空白 提交于 2019-12-12 21:09:43
问题 EDIT: See end of post for more information. I am trying to to get plugins created via the Firebreath framework (1.7.0) to load. I am on Windows 8 in Desktop Mode using Internet Explorer 10. I've reproduced this with the built-in test FBTtestPlugin that comes with Firebreath. The failure is silent in that the object element is created, but fails to have any properties specified by the plugin. How does one go about debugging this? The Microsoft Internet Explorer Compatibility Tool reports that

How to determine when the scrollviewer has ended scrolling?

纵然是瞬间 提交于 2019-12-12 19:17:26
问题 I need to adjust the scrollviewer to some point after the users has completed scrolling. For that i need to get to listen to when the scrolling has ended. iOS's UIScrollView has some similar methods - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView that is called when the scrollview - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate I tried ViewChanging and ViewChanged

Pushpin resize binding zoomlevel

与世无争的帅哥 提交于 2019-12-12 18:46:54
问题 I'm using WinRT with bing maps and i'm trying to set (programmatically) the RenderTransform value of my pushpin when zooming on map. I tried this Solution but seems that the Windows 8 controls do not support binding to the ZoomLevel property. does anyone have any either workaround or working example ? Thankyou in advance 回答1: I post here an example that can be used from others if needed. Exploiting your suggestion of using the "ViewChanged" event I wrote this code snippet: private double

Disable Application from sleeping in Windows 8 Metro

落花浮王杯 提交于 2019-12-12 18:29:08
问题 I am working on an app which displays videos and am running into an issue where the machine goes to sleep after hitting the sleep time limit while a video is playing. Is there a way to disable this behavior in a Windows 8 Metro application? 回答1: You should use the DisplayRequest class, specifically DisplayRequest.RequestActive for this purpose. You must also remember to call DisplayRequest.RequestRelease once you are done to allow the display to sleep, for example, if you are not actively