windows-8

Databinding with WinJS as powerful as with knockout?

孤者浪人 提交于 2019-12-11 00:23:00
问题 I have recently started to develop Win8 apps with HTML/CSS/JS. After 2 weeks a question regarding databinding with WinJS arose: Is it possible to perform databindings via WinJS as powerful as with e.g. knockout.js(Can WinJS do all the things knockout can)? If so, how would I perform an ko.applyBindings() from knockout with just WinJS? 回答1: While "as powerful" is quite subjective, WinJS has a very capable binding engine. It's not the same, but shares some characteristics with Knockout. It's

Why json serializer is not compliant with polymorphism?

允我心安 提交于 2019-12-10 23:45:58
问题 I use stock JSON serialiser in .NET 4.5 windows store app - System.Runtime.Serialization.Json.DataContractJsonSerializer I have a class which is supplied by the API provider say class A { public DateTime Date {get;set} } I wanted to hide Date field by doing this (NOTE - new keyword): class AEx : A { public new string Date {get;set} } But I am getting exception: type 'AEx' is not serializable with DataContractJsonSerializer because the data member 'Date' is duplicated in its type hierarchy. I

Simple hover effect in XAML?

此生再无相见时 提交于 2019-12-10 23:33:33
问题 So, I was recently frustrated with a challenge to copy this effect: <style> a:hover {background-color:yellow; } </style> Using the XAML implementation in WinRT. What is the most condense solution? 回答1: Okay, so here's my attempt: <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="VisualStateGroup"> <VisualState x:Name="Normal"/> <VisualState x:Name="Hover"> <Storyboard> <ColorAnimation To="Yellow" Duration="0" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)

Get/Set “File History” (Windows 8) settings using C#

烈酒焚心 提交于 2019-12-10 22:58:18
问题 I'm creating an app that suppose to run on windows 8 (Desktop) I need to: Enable users to launch "File History" using my app. I need to find the command line that opens "File History". I need to be able to display the current settings of "File History". I found that the data is saved under "C:\Users\UserName\AppData\Local\Microsoft\Windows\FileHistory\Configuration. The info is saved in an xml file. I prefer not to parse XML file especially if there is no specification of the exact format. So

Treeview control (comctl32 / VB5-era) missing icons & captions?

此生再无相见时 提交于 2019-12-10 22:56:25
问题 VB6 app works fine on Windows 8 with one exception: Display form with treeview. Displays correctly. Click button which displays another form used for entry. When the new form is dismissed (and a new node added to the treeview) all nodes' pictures and are invisible. The +/- signs display, but not the pictures and captions. If the form is closed and then re-opened, all nodes are properly displayed until another form is opened. The two forms involved are both MDI child forms. Thanks. 回答1: I just

Sending a mail from WinJS

余生长醉 提交于 2019-12-10 22:36:17
问题 I have the following code in a standard Windows 8 Javascript Store App: var test = document.getElementById("testButton"); test.addEventListener("click", function () { var mailto = new Windows.Foundation.Uri("mailto:?to=my.address@here.com" + "&subject=test" + "&body=Hello,<br>How are you?"); Windows.System.Launcher.launchUriAsync(mailto); The problem I have is that no matter what I do, I can't get a carriage return between Hello, and How are you? . I've tried \n & \r\n . What do I need to

error while installing mysql using pip (python)

自作多情 提交于 2019-12-10 22:09:41
问题 i'm new boy in python, recently i am starting to understand Django, for some basic functonality i have to use pip, while i try to install some package using pip it Give error live Belove. Thank you For Your Kind Responce. C:\Users\Artoon>pip install mysql Collecting mysql Collecting MySQL-python (from mysql) Using cached MySQL-python-1.2.5.zip Building wheels for collected packages: MySQL-python Running setup.py bdist_wheel for MySQL-python ... error Complete output from command c:\paython36

Detect commandline application from CMD without messing with PATH variable or System32/SysWow64 dir

你离开我真会死。 提交于 2019-12-10 21:48:06
问题 Scenario I would like to install an x86 CommandLine application on a folder outside C:\Windows\System32 or C:\Windows\Syswow64 and still be able to access my app under CMD without adding my application's path inside the PATH environment variable. Question Is this possible to do? Maybe touching a needed registry keys? Note: I know how to add my application into PATH variable/regvalue or how to access my application from CMD putting the required .exe in the System32 / SysWow64 folder. This

Windows Store Bluetooth

痞子三分冷 提交于 2019-12-10 21:35:13
问题 I have been looking through the MSDN docs for Windows Store apps and the only thing I found that was close to Bluetooth was the Windows.Networking.Proximity. This appears to be a class whose use is only for close proximity ie within 3-4 centimeters. The app I am developing is on a HTML5/WinJS platform. Is there a BluetoothSocket class like there is for android? For those store developers who are not familiar with Bluetooth on android essentially you create a Bluetooth Device member variable

Is NFC necessary to use Peerfinder?

我是研究僧i 提交于 2019-12-10 21:21:16
问题 In a Windows Store application, I am attempting to use the PeerFinder class to locate the Bluetooth enabled devices around me, but I get an generic exception every time I call Peerfinder.FindAllPeersAsync(): One or more errors occurred while processing the request. (Exception from HRESULT: 0x80070306) I think the issue is what Peerfinder.SupportedDiscoveryTypes == PeerDiscoveryTypes.None, but I'm not sure why this is. My computer does not have an NFC radio, but it does have Bluetooth. I would