windows-runtime

How to do UI Automation of Metro-Style Apps?

橙三吉。 提交于 2021-02-06 01:52:01
问题 I've downloaded and installed the windows 8 consumer preview, and I'd like to figure out how to use the UI Automation API's to get data from metro style applications. Background: I have a lot of automated tests which use the Microsoft UI Automation API's to interact with applications. The scripts are written in IronRuby against .NET 4 Initially, I'd simply like to check if the start menu is visible (and if so, close it) According to Microsoft, the normal UI Automation API's should be able to

How to do UI Automation of Metro-Style Apps?

十年热恋 提交于 2021-02-06 01:48:57
问题 I've downloaded and installed the windows 8 consumer preview, and I'd like to figure out how to use the UI Automation API's to get data from metro style applications. Background: I have a lot of automated tests which use the Microsoft UI Automation API's to interact with applications. The scripts are written in IronRuby against .NET 4 Initially, I'd simply like to check if the start menu is visible (and if so, close it) According to Microsoft, the normal UI Automation API's should be able to

Cannot access Zip File located in Assets folder in Windows Runtime Apps

主宰稳场 提交于 2021-01-29 03:57:30
问题 I'm trying to get the zip file that is located inside the Assets folder of Solution Explorer with the following code. It works well for other types of file like: .txt, .jpg, .png. But it gives error when trying to get the zip file. The system cannot find the file specified. var zipFile = await Package.Current.InstalledLocation.GetFileAsync("Assets\\Test.zip"); 回答1: Zip files aren't included in the appx package by default (.txt, .jpg, and .png are). Select your file in the solution explorer,

Cannot access Zip File located in Assets folder in Windows Runtime Apps

橙三吉。 提交于 2021-01-29 03:41:56
问题 I'm trying to get the zip file that is located inside the Assets folder of Solution Explorer with the following code. It works well for other types of file like: .txt, .jpg, .png. But it gives error when trying to get the zip file. The system cannot find the file specified. var zipFile = await Package.Current.InstalledLocation.GetFileAsync("Assets\\Test.zip"); 回答1: Zip files aren't included in the appx package by default (.txt, .jpg, and .png are). Select your file in the solution explorer,

How do I view a XAML control's default templates and styles without the Visual Studio designer?

一曲冷凌霜 提交于 2021-01-28 13:05:34
问题 According to the Control template documentation on MSDN, the officially-supported way to view a Control's default templates and styles is with Visual Studio's Designer (well, technically the Document Outline , but that only works with the Designer turned on): A fast way to apply themes to your controls is to right-click on a control on the Microsoft Visual Studio Document Outline and select Edit Theme or Edit Style (depending on the control you are right-clicking on). You can then apply an

How do I view a XAML control's default templates and styles without the Visual Studio designer?

◇◆丶佛笑我妖孽 提交于 2021-01-28 13:02:06
问题 According to the Control template documentation on MSDN, the officially-supported way to view a Control's default templates and styles is with Visual Studio's Designer (well, technically the Document Outline , but that only works with the Designer turned on): A fast way to apply themes to your controls is to right-click on a control on the Microsoft Visual Studio Document Outline and select Edit Theme or Edit Style (depending on the control you are right-clicking on). You can then apply an

How do I view a XAML control's default templates and styles without the Visual Studio designer?

倾然丶 夕夏残阳落幕 提交于 2021-01-28 13:01:51
问题 According to the Control template documentation on MSDN, the officially-supported way to view a Control's default templates and styles is with Visual Studio's Designer (well, technically the Document Outline , but that only works with the Designer turned on): A fast way to apply themes to your controls is to right-click on a control on the Microsoft Visual Studio Document Outline and select Edit Theme or Edit Style (depending on the control you are right-clicking on). You can then apply an

Test whether the pointer is over a UIElement

删除回忆录丶 提交于 2021-01-27 21:20:22
问题 In WPF I can easily test whether the mouse is over a UIElement : System.Windows.UIElement el = ...; bool isMouseOver = el.IsMouseOver; I want to do the same in WinRT, but there seems to be no equivalent to IsMouseOver for a Windows.UI.Xaml.UIElement . Windows.UI.Xaml.UIElement el = ...; bool isPointerOver = ??? As a workaround, I can add two handlers, for the PointerEntered and PointerExited events, but I'm looking for a more direct solution. 回答1: In uwp the UIElement doesn't have a property

How to create a modal messagebox in WinRT using native C++

做~自己de王妃 提交于 2021-01-27 05:37:07
问题 I'm working on a cross-platform C++ SDK at the moment and I have to port our assert handler to WinRT. One part of the process is to display a message box, wait for the user input and trigger a breakpoint when the user selects "debug". I already got a message box to appear, but I cannot find a way to wait for the message box to appear without leaving the current point of execution. Here is my code so far. // Create the message dialog factory Microsoft::WRL::ComPtr<ABI::Windows::UI::Popups:

Detect ListViewitem where rightTapped event happened

时光毁灭记忆、已成空白 提交于 2020-12-11 06:23:23
问题 Is there any way to get the ListItem from RightTappedRoutedEventArgs e without SelectionChanged event and related sources because this ListView have SelectionMode="none" . If this is not possible with SelectionMode="none" , will it be available with other selection types, but still without selection change event? Item xaml template below. <ListView.ItemTemplate> <DataTemplate> <Grid Height="56" Width="300"> <Image .../> <TextBlock .../> </Grid> </DataTemplate> </ListView.ItemTemplate> Due to