windows-8

Use Python to Edit Windows 8 Power Options

别来无恙 提交于 2019-12-10 20:57:46
问题 The Problem: Every time I restart my computer my Windows 8 power settings go back to default and puts my computer to sleep after an hour. I don't want my computer to ever go to sleep unless I say so... I have to go in Control Panel > System and Security > Power Options > Edit Plan Settings and manually edit the put the computer to sleep setting to Never. What I want: A Python script to edit the Power Options in Windows 8. I will set it to run every time I reboot. I've searched for a Python

Using FileSavePicker with MessageDialog's IUICommand event

我的未来我决定 提交于 2019-12-10 20:56:34
问题 Individually, all code works perfectly. The snippet for saving the file, the snippet for picking a directory to save it to and also the message dialog works great. But when I tie it all together, I get an access denied. I am not using the DocumentsLibrary capability since it is not required of me to do so in this case, however, enabling this capability after running into issues confirmed that it is not the issue. Scenario: User wants to create a new document after entering text in the text

Serializing Object containing BitmapImage

╄→尐↘猪︶ㄣ 提交于 2019-12-10 20:36:02
问题 This is a further question about this topic: How to use deserialized object? I have a Problem with some variables in my class, right now I just put [XmlIgnore] infront of the variables wich cannot be serialized, so the serialazation of the class works for now. My class looks like this: public class Channel : INotifyPropertyChanged { public int Width { get; set; } public int Height { get; set; } [XmlIgnore] public BitmapImage Logo { get; set; } public string CurrentCoverURL { get; set; }

How to implement AutoPlay for Windows 7/8

笑着哭i 提交于 2019-12-10 20:13:14
问题 Quick info: I am using Visual Studio 2008, Windows 8 (64-bit). I am trying to creating an AutoPlay Handler that presents itself when a WPD device is plugged into the computer. If my AutoPlay option is selected, all I want it to do is to simply launch my application. Since there aren't any recent examples of implementing AutoPlay for Windows, I was hoping someone could help me out a little and answer a couple of questions: 1). I have created an ATL project with a COM object that implements the

Custom ItemTemplate not showing up in Visual Studio 2010 - Add New Item

强颜欢笑 提交于 2019-12-10 19:39:09
问题 I have created ItemTemplates before in VS2005/2010 and never had any problem. With VS 2012 Ultimate edition on Windows8, the ItemTemplate I am creating isn't showing up in the Add New Item list. Tried just the basic steps mentioned here: http://msdn.microsoft.com/en-us/library/tsyyf0yh.aspx Created a new Windows 8 Store App(xaml) Blank Project. It has a MainPage. I added a TextBlock to the mainpage to make it look different. Then exported the template. The .zip file gets added to the

Socket BUG in Windows 8 Consumer Preview + Visual Studio 11 Developer Preview

心已入冬 提交于 2019-12-10 19:28:54
问题 I am writing an app in Visual Studio 11 Developer Preview and I get this error after the app has run for a while with the reader.InputStreamOptions = InputStreamOptions.Partial; option set: An unhandled exception of type 'System.Exception' occurred in mscorlib.dll Additional information: The operation attempted to access data outside the valid range (Exception from HRESULT: 0x8000000B) The socket can read the stream fine when that option is not set. Here is the code for reference: private

ListView in a metro app does not get its vertical scrollbar

坚强是说给别人听的谎言 提交于 2019-12-10 19:18:51
问题 I am not experienced in Windows Store (aka Metro) app XAML, so perhaps I am overlooking something simple, but according to books and samples, a vertical scrollbar is a natural part of a ListView control, and unless explicitly disabled will show up when there are invisible items in the ListView. But on in the case of my app. I have a typical List/Detail page with items in the left pane - they are displayed fine, with scrollbar, and selected item details in the right pane. Selected item

Stream stream = WriteableBitmap.PixelBuffer.AsStream() missing

筅森魡賤 提交于 2019-12-10 19:18:09
问题 I'm writing windows store app (8.1) and I have sample (probably for win 8.0): private WriteableBitmap WriteableBitmap; … WriteableBitmap = new WriteableBitmap(500,500); … using (Stream stream = WriteableBitmap.PixelBuffer.AsStream()) { … } So I have created new win 8.1 project and trying to do it same way, but when I get to: using (Stream stream = WriteableBitmap.PixelBuffer.AsStream()) My project dont recognize *.AsStream() method, can anyone tell me why? 回答1: using System.Runtime

Is there a way to store instances of own classes in the ApplicationSettings of a Windows Store app?

∥☆過路亽.° 提交于 2019-12-10 19:17:35
问题 In a Windows Store app I can only store WinRT types in the ApplicationSettings, according to the documentation. For roamed settings that should be held together I can use ApplicationDataCompositeValue. Trying to store an instance of an own class or struct results in an Exception with the message " WinRT information: Error trying to serialize the value to be written to the application data store. Additional Information: Data of this type is not supported". The term "trying to serialize"

Local push notification to Win8 Live Tile running JS code inside app

守給你的承諾、 提交于 2019-12-10 19:12:43
问题 I am trying to send updates to my app's tile. This works fine when the app is running. I can, for example, easily send a tile update notification to the tile when the user clicks a button. What I can't work out is how to update the tile when the app isn't working. The only option I have found for this is to poll (or push from) a remote webserver using REST on HTTP . This isn't ideal for me, and I cannot believe that is the only method of updating the tile. Ideal here would be to specify a