windows-8

Programmatically open charm bar, power bar and start menu with C#

流过昼夜 提交于 2019-12-17 20:49:18
问题 How to programatically open: Charm Bar Power Options Start Menu in windows 8? I want to be able to open them from within my c# application Cannot find the documentation I need Thanks! 回答1: I'd bet sending the Windows key (and the other key, as needed), would be sufficient. Here is another post on how to do so with an API call. SendKeys.Send and Windows Key To open... ... the Start Screen - just send the Windows key. ... the Charms - send the Windows key + C. ... the settings Charms bar

WinRT Replacement for System.ComponentModel.TypeConverter

≡放荡痞女 提交于 2019-12-17 19:51:00
问题 It doesn't look like TypeConverter is available to use. What is recommended to replace this? I was going to go and create my own TypeConverter class to use to replace it, but if there is a new or better way in WinRT to do it, I'd go that route. There are also many other classes that I would need to recreate; like all the default type converters. 回答1: There is no TypeConverter class in the WinRT and the team has not announced any plans to include it in a future release. You have a number of

get report of all open explorer windows

佐手、 提交于 2019-12-17 19:09:28
问题 I want to get a report of all open explorer windows titles and current paths. The current paths part of this is problem is answered here with C#, but I want this for powershell and am not sure how to adapt it. I am not sure how to bring out the window titles part of it. Could someone please assist. 回答1: Sounds to me like you're looking for something like this: $app = New-Object -COM 'Shell.Application' $app.Windows() | Select-Object LocationURL AFAICS the window objects don't have a title

VS2012/ Blend 5: Debugging an Exception (only) occurring in design view

戏子无情 提交于 2019-12-17 19:05:55
问题 I'm developing a Metro-style app (for Windows 8) using C# and XAML. I have set up my viewmodels to be used as design-time datacontexts, like so: xmlns:vm="using:hub.ViewModels" d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type=vm:ViewModels My app appears to work perfectly when run, but in the design views of both VS 2012 and Blend, I occasionally get this (unhelpful) error message: An Exception was thrown. TargetException: Error in the application. Stacktrace at System

Can Windows Store applications be built with Mingw?

眉间皱痕 提交于 2019-12-17 18:54:51
问题 Is there a way to build Windows Store applications with the Mingw toolchain? (And ultimately cross compile them from mingw on Linux, since if it works in one Mingw toolchain it should work in another.) I guess one requirement is to stick to the API:s allowed in the Windows Store app sandbox, but what other things are there to consider before distribution to the store? XAML? 32 or 64 bit code? Since Mingw C++ is not link compatible with MSVC++, I assume plain C programs without WRL would be

WebClient class doesn't exist in Windows 8

这一生的挚爱 提交于 2019-12-17 18:37:44
问题 I want to use a HTTP webservice, and I've already developed an app for wp7. I use the WebClient class, but I can not use it for windows 8 ("error: type or namespace can not be found"). What else can I use? Can you provide me a sample of code? Does Microsoft have a site to help when a namespace don't exist? 回答1: Option 1 : HttpClient if you don't need deterministic progress notification this is what you want use. Example. public async Task<string> MakeWebRequest() { HttpClient http = new

Can I use Entity Framework or Linq To SQL with Windows 8 Metro Style apps?

我的未来我决定 提交于 2019-12-17 18:36:44
问题 I'm looking for some kind of ORM that can be used with Metro Style apps. I found lots of posts referring to different SQLite implementations that seem to be working (or not, according to other posts) with Metro style apps, but no working sample projects so far showing an ORM on Windows 8 Metro. Other posts are referring to projects that might work, but not pass the Marketplace certification because of forbidden API calls. Lots of the information I found is probably outdated, so I'm not sure

Why doesn't the Windows 8.1 MenuFlyout have ItemsSource property?

梦想与她 提交于 2019-12-17 18:29:18
问题 I was reading this article and could not help but wonder the same thing. Is there a way to databind a menu Flyout control? 回答1: Yes. I put together a simple solution for developers who desire this functionality. It uses an attached property to identify the ItemsSource and the ItemTemplate for a Flyout control. If the developer elects to use a MenuFlyoutItem or something else, it is up to them. Here's the attached property: public class BindableFlyout : DependencyObject { #region ItemsSource

What is an equivalent method to `GetCustomAttributes` for .NETCore (Windows 8 Framework)?

女生的网名这么多〃 提交于 2019-12-17 18:25:33
问题 I'm putting together an app that interfaces with Stack API and have been following this tutorial (although old API version it still works). My problem is that when using this within the Windows 8 Store App I'm contrained by the .NETCore Framework which doesn't support the GetCustomAttributes method found below: private static IEnumerable<T> ParseJson<T>(string json) where T : class, new() { var type = typeof (T); var attribute = type.GetCustomAttributes(typeof (WrapperObjectAttribute), false)

WinRT and build-in Windows 8 Apps

孤者浪人 提交于 2019-12-17 18:22:10
问题 Can non-Metro Windows apps (ex: Explorer) be built with the new WinRT, or must they still be Win32 based? 回答1: I asked this during the 'Ask the Experts' session at //Build/. The answer was "Yes, within reason. Not all of the WinRT api's will function when called from desktop apps - for example any metro specific ones will fail. No explicit list of which ones work from desktop (non-metro) apps is available." Edit: It appears that the documentation has been updated to provide a list of WinRT