windows-store-apps

Can't create file using fstream in windows store app 8.1

给你一囗甜甜゛ 提交于 2019-12-13 00:42:57
问题 I'm using direct3D 11.1 to create my game,i want to store player last record in a file so here is my code:(it fails in !File.good() ) fstream File("Score.txt"); if (!File.good()) { return; } if (!File.is_open()) { return; } if (File.bad()) { return; } Writer.Write("Easy", getString(Scene->Score), File); File.close(); and here is my XMLWriter class to write in file: class XmlWriter { public: void Write(string const &replace, string const &replaceBy, fstream &file) { fstream tempFile; tempFile

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

Tutorial for a Top AppBar / NavigationBar

蹲街弑〆低调 提交于 2019-12-13 00:21:24
问题 I tried do create a navigation bar like in the Windows News App or Food/Health-App, that appears on swiping from the bottom or rightclicking. I wanted to do it the mvvm-way: Alle views define an ApplicationBar that contains a UserControl. This contains a horizontal ItemControl which is bound to a ViewModel. This ViewModel contains all the stuff I need to create the navigation buttons. On every Page I tell the ViewModel my Page's name and it gives me buttons with the button of the current Page

Upload UWP app to Microsoft Store in all 3 platforms (x86, x64, ARM)

本小妞迷上赌 提交于 2019-12-12 23:04:46
问题 I have a 3rd party DLL (in all 3 platforms x86, x64 and ARM) referring in my UWP app. Due to this reason I have to change my reference manually each time I need to build my UWP app to specific platforms. Now I need to publish the app to the store but I can't select all platforms due to the manual handling of the 3rd party DLL. I tried building the app in release mode separately and tried to upload to the store but it does not allow. Only way possible is by selecting all 3 platforms in the

how to load image on webview from ms-appdata:///local

雨燕双飞 提交于 2019-12-12 19:58:37
问题 I'm developing windows store apps with html5/javascript. I have to load image from src " ms-appdata://local/testimage.png" to webview.I can't able to load the image using this src on navigateToString method. Any help would be greatly appreciated 回答1: You should try the ms-appx-web scheme. I believe that if you place the content in a subfolder, ms-appdata should work too. More on this on MSDN 回答2: I recently updated my Visual Studio 2015 apache cordova project to visual studio 2017. I had few

Can't establish connection using StreamSocket (universal windows)

柔情痞子 提交于 2019-12-12 18:27:40
问题 Im trying to follow this code sample from microsoft, who is a basic code for sending/receiving data over network from windows 10 computer/phone. Im on VS2015, i have a phone on W10 and my computer also. The problem is that my application seems to create packet and send one to establish the connection (i have seen this packet with wireshark), but i never received it on the server side. Here is code to listen port from the actual internet connection available and wait for a connection : public

FileSavePicker and deprecated ApplicationViewState

a 夏天 提交于 2019-12-12 17:50:23
问题 In the documentation for the FileSavePicker, it states: Warning If you try to show the file picker while your app is snapped the file picker will not be shown and an exception will be thrown. You can avoid this by making sure your app is not snapped or by unsnapping it before you call the file picker. I'm currently checking to see if the app is snapped or not, and my app responds differently in each case. My default behavior isn't showing the FileSavePicker, either, so I can't just try and

Save and XDocument to a file in a “using stream”

╄→гoц情女王★ 提交于 2019-12-12 17:13:40
问题 So I'm trying to do the simple task of opening an XML file, adding and XElement to it, and saving it. My curent code doesn't work: Uri dataUri = new Uri("ms-appx:///XML Files/Pinouts.xml"); StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(dataUri); using (var stream = await file.OpenStreamForWriteAsync()) { XDocument doc = XDocument.Load(stream); doc.Add(new XElement(XElement.Parse(CurrentPinOut))); doc.Save(stream); stream.Flush(); } As I get an "Access denied" error. I'm

Logging framework for Windows Store Apps

五迷三道 提交于 2019-12-12 16:59:17
问题 I'm looking to build logging and instrumentation into my windows store app, any recommendation around good logging frameworks for windows store apps? I know I can roll my own by writing to a file or Azure Storage, was curious if there is anything out there already 回答1: Go for MetroLog. MetroLog is a lightweight logging framework designed for Windows Store and Windows Phone 8 apps. Although the API is based on NLog and log4net, the intention is that it's a very basic logging system. 回答2: You

Using a Keep-Alive connection in WinRT's HttpClient class?

我怕爱的太早我们不能终老 提交于 2019-12-12 16:05:27
问题 Our WinRT app is incredibly slow when opening connections to our servers. Requests take ~500ms to run. This is blocking some of our scenarios. When debugging, we noticed that when Fiddler is active, the requests are much faster - ~100ms per request. Some searches later we understood that was because Fiddler was using Keep-Alive connections when proxying calls, which makes our proxied calls much faster. We double-checked this in two ways. We set UseProxy to false and observed that the request