windows-8

Your developer license has expired (Windows 8)

假如想象 提交于 2019-12-05 06:05:28
My temporary developer license (using Visual Studio 2011 Beta and Windows 8 Consumer Preview) expired and a popup asked me to aply for a new one. This all seemed to work, but when I build and deploy to the local machine it takes me to the app store and tells me that the developer license has expired. I've tried: Unistalling my app from the home screen Cleaning my project solution Removing my developer license using powershell command Unregister-WindowsDeveloperLicense and getting new license again Restarting machine I can create new projects that build and deploy fine, but my existing project

How to P/Invoke to a native dll from Metro?

試著忘記壹切 提交于 2019-12-05 06:04:28
I've got a library consisting of two parts - One .net assembly that P/Invokes to a native 3rd party dll. In desktop mode this works just fine: However, when referencing the assembly from a Metro style app and running it, it throws a System.DllNotFoundException on the P/Invoke complaining that "Unable to load DLL 'library': The specified module could not be found." The native dll does not do anything special but only creates out-going TCP/IP connections to a server. The system cannot know this, but rather the native dll could do anything. This is why I suspect it might not be possible to do

Avoiding memory leaks winjs EventListeners

≯℡__Kan透↙ 提交于 2019-12-05 05:49:52
问题 I want to know if I add an event listener to a button, do I have to remove it on unload ? Would pressing the 'back' button automatic removes everything current page elements in which I don't need to worry about memory leaks? (function () { "use strict"; ui.Pages.define("/pages/registraton/registraton.html",{ ready: function (element, options) { document.getElementById("submitRegister").addEventListener( "click", postRegistration , false); }, unload: function () { document.getElementById(

Can I use Sqlite in a WinRT application (javascript)?

一曲冷凌霜 提交于 2019-12-05 05:14:27
Is it possible to use a Sqlite database in a windows 8 (winRT) javascript application? What I want to achieve is to download a Sqlite database and store this in local storage before use. I believe some form of local storage is available to javascript based WinRT applications, but I want to know if Sqlite is usable in this scenario. I'm also aware that the .Net implementation of Sqlite uses some win32 calls and I believe these will not be allowed by the windows8 app cerififcation process. JavaScript has HTML5 IndexedDB available to it out of the box. As for SQLite, you can use it, provided that

Why exposed types must be sealed for WinMD/WinRT components?

别来无恙 提交于 2019-12-05 04:51:20
VS compiler does not allow to create sealed exposed types for WINMD type library. Why is this restriction placed ? (I know about sealed types advantages, my question is with respect to Win RT components). This is an architectural limitation, imposed by COM. Which sits at the core of any WinRT type, they are derived from IUnknown and IInspectable. The problem with COM is that it only supports interface inheritance but not implementation inheritance. Which was a strong COM design goal, implementation inheritance is too fraught with implementation details, including the infamous diamond problem.

Windows 8 - BeginAnimation?

╄→гoц情女王★ 提交于 2019-12-05 04:40:14
It seems I can't do myObject.BeginAnimation(dp , animation) . Is this a bug or has it been changed? You need to use a storyboard. Add your animation to the storyboard and have the storyboard begin the animation. var storyboard = new Storyboard(); var opacityAnimation = new DoubleAnimation { From = 0, To = 1, Duration = DurationHelper.FromTimeSpan(TimeSpan.FromSeconds(1)), }; storyboard.Children.Add(opacityAnimation); Storyboard.SetTargetProperty(opacityAnimation, "Opacity"); Storyboard.SetTarget(storyboard, myObject); storyboard.Begin(); 来源: https://stackoverflow.com/questions/8631088/windows

How to get method name win 8 app

懵懂的女人 提交于 2019-12-05 04:34:53
How to get the current method name in win 8(WinRT) app ... earlier in wp7 we could use System.Reflection.MethodBase.GetCurrentMethod().Name but its not there anymore thanks Yes, .NETCore lacks a lot of such things... and don't even get me started on GetTypeInfo() ! But perhaps a pragmatic workaround is to get the compiler to do it for you? string CallerName([CallerMemberName]string caller = "") { return caller; } ... string name = CallerName(); This option can be helpfull if you need to override a method private string GetMethodName(Expression<Action> expression) { var methodName = (expression

How to play Youtube or Real Time Streaming Protocol Videos in Windows 8 Metro apps?

梦想与她 提交于 2019-12-05 04:03:57
问题 I am building one app which can pick videos from our channel and list and play from within the application. I have done all the json parsing and have everything ready but the only problem is that I am not able to play the rtsp videos coming from the Youtube API. I have read that it is possible to play rtsp videos using the MediaElement control but its not working, my sample XAML code is as below. <MediaElement Width="500" Height="500" AutoPlay="True" Source="rtsp://v6.cache5.c.youtube.com

How to test a Windows8 app on a surface

末鹿安然 提交于 2019-12-05 04:01:18
How do I port a Windows8 app that I built onto a Surface? I've built the app using Visual Studio and I can test it just fine on the desktop machine by just hitting F5. How can I put it onto a Surface to test it without having to publish it to the Store? Thanks. This link explains how to test your app on a Surface using remote debugging: http://timheuer.com/blog/archive/2012/10/26/remote-debugging-windows-store-apps-on-surface-arm-devices.aspx A quick summary: 1. Download the Remote Tools for Visual Studio 2012 (from here , under "Additional software" near the bottom) and install them on your

Using async await inside void method

强颜欢笑 提交于 2019-12-05 04:00:14
I have method with signature I cannot change. It should be protected override void OnInitialize() Using Windows 8 Metro API I need to check if file exists and read it, inside this NoSignatureChange method. Using PlainOldCSharp, I would write something like protected override void OnInitialize() { ... try { var file = folder.OpenFile(fileName); fileExists=true; } catch(FileNotFoundException) { fileExists=false } } Remember, in Windows 8 API only way to check if file exists is handling FileNotFoundException Also, in Windows 8 API all FileIO API is async, so I have only file.OpenFileAsync method.