windows-runtime

UWP How to get ListviewItem Currently clicked and Previously clicked

喜你入骨 提交于 2019-12-08 04:37:32
问题 I am developing UWP App, I have a Listview bind with a class, wherein upto 10 items. Listview have a DataTemplate and a Usercontrol is inside this DataTemplate. I want to click on any item so the animation (storyboard) should start and the ColorBand should expand toward right and when I click on another item now the expanded (previously clicked) ColorBand should collapse and the current clicked item's ColorBand should expand. This approach can be possible if I put this ColorBand inside the

WinRT GridView But No GridViewColumn

妖精的绣舞 提交于 2019-12-08 04:32:13
问题 I do not have Windows 8 and Metro installed. My question is based on the documentation. It appears DataGrid is gone but ListView and GridView remain. GridViewColumn is gone. I get the tile nature of Metro. My question is can GridView be configured for a row column presentation? I have an app that for the most part would present great under Metro and would benefit from rights contracts. But there is one page were I need old school GridViewColumn like presentation. Thanks 回答1: I'm not sure if I

How to locate where an error arises in a “PackageManager.AddPackageAsync” method call?

荒凉一梦 提交于 2019-12-08 02:53:25
I'm debugging an example app that deploys an Windows Metro App Package (".Appx" file). It call a WinRT method " PackageManager.AddPackageAsync " which fails with detailed error code text (retrieved from the call return value after the operation was finished): error 0x80070002: Windows cannot register the package because of an internal error or low memory. My target is to find where exactly this error arises in the WinRT call. I think the best way for achieving this is by finding where the error code is set. I've done this before with the old simple Win32 API but now with this new complex com

Render control into image in WinRT metro

夙愿已清 提交于 2019-12-08 02:43:34
问题 I'm creating an application for windows 8 metro, I need to render a framework control into an image and save it to hard disk but do not know how. Can I use SharpDX for this? How can I do? Thanks in advance for the help 回答1: If you follow through this thread the limitations of Metro and the reasons why it won't work are explained. The essence of it is: Sorry, but rendering Xaml to an element or capturing a screenshot of your own app did not make it into the release version. It is by design

Change Caret Color in WinRT?

假装没事ソ 提交于 2019-12-08 01:54:23
问题 So in WPF and Silverlight you could set the caret color for TextBox using TextBox.CaretBrush, but in WinRT it seems in all their wisdom they removed this property. So now if the TextBox is a dark color, since it defaults the caret color to black you can't see it, and if the background color of your TextBox is black the caret ceases to exist completely. I find this completely illogical, there has got to be a way to change the caret color, either pragmatically or something? Does anyone have any

How to share Windows 8 WinRT Metro style libaries/components across apps

▼魔方 西西 提交于 2019-12-08 01:36:52
问题 The Metro documentation states that the applications are self-consistent (no shared DLL’s, etc), So I’m just wondering how you can create a modular, BIG Metro application by creating reusable components/libraries. Considering the case for HTML5/JavaScript Metro apps, if a lot of them should contain the same CSS and JavaScript (consider jQuery, templates) or WinJS scripts then it doesn't look quite good … I expected some form of libraries/reuse to exist from the start. The HDD space is

Image flickering in Windows RT App

假如想象 提交于 2019-12-08 01:32:09
问题 I have a Windows RT app where I programmatically change the Bitmap in the Image component. All works well with the XAML and the code below except the flickering we see when the image is changed. What should I change to get rid of the flickering? XAML : <Page x:Class="iSurfBrainViewProto01.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:iSurfBrainViewProto01" xmlns:d="http://schemas.microsoft

MediaCapture StartPreviewAsync fails

為{幸葍}努か 提交于 2019-12-07 22:21:20
问题 I am trying to start video preview capture from the camera in my UWP app but StartPreviewAsync throws an exception Sample Code: MediaCapture mc = new MediaCapture(); await mc.InitializeAsync(); await mc.StartPreviewAsync(); 回答1: This error occurs because currently StartPreviewAsync requires a sink to output frames to. This can be fixed by creating a capture element in xaml to display the frames. <CaptureElement Name="captureElement"/> now code can be updated to display the preview to the

XamlParseException when I inherit a Page from a Generic base class

Deadly 提交于 2019-12-07 20:43:08
问题 I'm currently working with this exact code: public class ViewModelAwarePage<T> : Page { } public class BaseMainMenuView : ViewModelAwarePage<String> { } public sealed partial class MainMenuView : BaseMainMenuView { public MainMenuView() { this.InitializeComponent(); } } And xaml: <local:BaseMainMenuView x:Name="pageRoot" x:Class="Tutorial.UI.WinRT.Views.MainMenuView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns

How to download a webpage in MetroStyle app (WinRT) and C#

依然范特西╮ 提交于 2019-12-07 19:16:46
问题 I'm creating a MetroStyle app and I want to use a website API that is based on the HTTP Get methods. For instance to login I should download the XML returned by this URL: websitehost.com/api/login.php?u=username&p=password The problem is that the new MetroStyle apps won't let me to use many of the methods I've been using for years in .Net so how can I download the returned XML document and parse it? 回答1: You might be searching for this: public async Task<string> DownloadPageStringAsync(string