windows-8

how to trigger a button click in my code? [duplicate]

喜夏-厌秋 提交于 2019-12-06 10:53:15
问题 This question already has answers here : Invoking the click method of a button programmatically (2 answers) Closed 6 years ago . How can I trigger a button click directly in my code? I have a code like this: namespace App1 { /// <summary> /// An empty page that can be used on its own or navigated to within a Frame. /// </summary> public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); } protected override void OnNavigatedTo(NavigationEventArgs e) { //

Windows 8: How to undo & redo ink using built in Inking functionality?

一个人想着一个人 提交于 2019-12-06 10:49:26
问题 I've implemented inking code in my app based on the simplified inking sample by microsoft : http://code.msdn.microsoft.com/windowsapps/Input-simplified-ink-sample-11614bbf/view/SourceCode First I made a class that saves data of an operation (draw/delete/clear) like this: public enum eInkOperation { Draw, Delete, None } public class InkOperation { public InkStroke Stroke { get; set; } //requred for drawing from undo public eInkOperation Operation { get; set; } public InkOperation(InkStroke

How to capture the screen in a Metro C# app

时光毁灭记忆、已成空白 提交于 2019-12-06 10:29:41
问题 Anyone got a snip for grabbing a screenshot of your metro app using C#? Or C++? Or VB? Thanks... 回答1: No, there is no way for a Metro style app to do this. By design they cannot directly interact with other apps outside of themselves, including capturing screenshots which may include other apps. There also isn't a way for a Metro style app to render Xaml elements to a bitmap so you can't readily implement this for your own app. --Rob More details are found here : MSDN Forum I haven't test

Windows Store Apps: Change the icon of an AppBar Button?

亡梦爱人 提交于 2019-12-06 10:11:02
问题 I want to change the icon of an AppBar Button in my Windows Store app. I found that the AppBar buttons have XAML markup that looks like this: <Style x:Key="PicturesAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}"> <Setter Property="AutomationProperties.AutomationId" Value="PicturesAppBarButton"/> <Setter Property="AutomationProperties.Name" Value="Pictures"/> <Setter Property="Content" Value=""/> </Style> What does the content value  mean? Is there any

How does the WinRT Chrome app print without triggering the OS's “Print” dialog?

限于喜欢 提交于 2019-12-06 09:56:58
问题 How does the WinRT Chrome app print without triggering the OS's "Print" dialog? From what I've seen elsewhere, every WinRT app must go through the Windows Print dialog to print. But when you print a page from the Chrome Metro app, you get the Chrome Print dialog, and the Windows Print dialog is not triggered. 回答1: I don't think you can. The one browser app that enjoys the privilege of being your WinRT browser also enjoys special privileges not granted to other WinRT apps. For example, you can

SimpleIoC - Type not found in cache: Windows.UI.Xaml.Controls.Frame

扶醉桌前 提交于 2019-12-06 09:39:20
I am running into the below error the first time my ViewModel is being instantiated by the SimpleIoC. I believe I have setup the container as it should be, but for some reason, I am still getting the below error. Any ideas or assistance would be very much appreciated. Microsoft.Practices.ServiceLocation.ActivationException was unhandled by user code HResult=-2146233088 Message=Type not found in cache: Windows.UI.Xaml.Controls.Frame. Source=GalaSoft.MvvmLight.Extras StackTrace: at GalaSoft.MvvmLight.Ioc.SimpleIoc.DoGetService(Type serviceType, String key) in c:\Users\Public\Downloads\CodePlex

Binding to InnerHTML in MetroStyle App from Javascript

試著忘記壹切 提交于 2019-12-06 09:21:07
I have a Div Defined as: <div class="article-content" data-win-bind="innerHTML: content"></div> and im binding to it with an object which has content property. now the object i create using external resources and sometimes the content property would has content like this : "some text <iframe width="560" height="315" src="youtubelink" frameborder="0" allowfullscreen></iframe>" this throw exception: Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property to add script

Surface SDK only for surface

时光毁灭记忆、已成空白 提交于 2019-12-06 09:15:09
This might be a stupid question, but I couldn't find the answer anywhere. Does the Microsoft Surface SDK 2.0 only work with Microsoft Surface products, or can I use it with other touchscreens? I really just like the way the SurfaceTextBox control works (popping up a onscreen keyboard when clicked) and was wondering if I could use it in a program I'm making (which uses a Elo touchscreen monitor, not multi-touch). Edit Thanks for the responses. I downloaded and installed the SDK 2.0 and tried to run the sample apps that are included. They don't seem to respond to my finger touches but do work if

Metro App, Query Current Apps in Windows Store

余生长醉 提交于 2019-12-06 09:01:31
问题 How does one query data such as App Icons, Reviews, Stars, Price, etc. from Windows Store in another App? For instance, picture an app called "best drawing tools" with comparisons of 5 popular drawing tool apps, then links to Window Store (Or even better direct install links). The premise of the app "Great Windows Apps" (http://www.greatwindowsapps.com) seems to be the basic functionality I am trying to imitate. I also found MetroStore Scanner http://metrostore.preweb.sk which appears to

How to show “An app on your PC needs the following Windows feature.” dialog programmatically?

混江龙づ霸主 提交于 2019-12-06 08:59:48
问题 When I try to run .NET 3.5 applications on Windows 8.1 which has not .NET 3.5 Framework, Windows will show the "An app on your PC needs the following Windows feature. .NET Framework 3.5 (includes .NET 2.0 and .NET 3.0)" dialog automatically. But I want to show this dialog programmatically. I think that the dialog is much more friendly than DISM command. Any help would be appreciated. 回答1: The dialogue you are searching for is provided by a tool called Fondue (Features on Demand User