uwp-xaml

UWP buttons inside Listview items

青春壹個敷衍的年華 提交于 2019-12-24 03:07:59
问题 I'm working on my first UWP app and I want create a UI like this . For each list item (project) there'll be a set of buttons. For certain list items(projects) some of these buttons will be disabled some times. So I need to disable and change the image for such button in those list items(projects). I tried to implement it using a list view like this. But I am not sure how I can enable/disable some of those buttons depending on the condition. Tried adding a DataContextChanged event and trying

Is it possible for individual listviewitems selected, pointerover and pressed states to be controlled by the data bound item

浪子不回头ぞ 提交于 2019-12-24 01:06:06
问题 I'm currently trying to style a ListView so each of the items inside it can control their own background color, PointerOver, Pressed and Selected states. I have figured out that I can set the Background of the ListViewItem to Transparent and let the DataTemplate for my item control the Background. But what I'm struggling with is the VisualStates of the ListViewItem . They just won't seem to style correctly. What I've tried so far is so far is putting my Binding code for the colors inside the

How to share filtered image in UWP C#

别等时光非礼了梦想. 提交于 2019-12-24 00:59:37
问题 I have an image processing windows 10 application. I am applying filters on that image and showing it on the image element. This is how I am applyting filter and setting it as a source to MainImage element. ProcessImage processImage = new ProcessImage(sourcePixels, width, height); byte[] blurEffect = processImage.BlurEffect(width, height); WriteableBitmap blurImage = new WriteableBitmap((int)width, (int)height); using (Stream stream = blurImage.PixelBuffer.AsStream()) { await stream

UWP app show/hide Button using binding

人盡茶涼 提交于 2019-12-24 00:57:16
问题 I have a List view which shows the project names and some buttons for each project which do different actions like adding a comment viewing images for that project etc.. Depending on the project some projects will have some of these buttons disabled sometimes. And some buttons will not be visible in some projects. So there are two things I want to achieve using data binding in this code. Depending on some boolean variables of the ProjectModel, I need to change the visibility of the buttons. I

ReadLinesAsync in UWP from absolute file path

浪尽此生 提交于 2019-12-23 23:41:14
问题 I get error The filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B) My code is public async void ReadFile() { var path = @"F:\VS\WriteLines.xls"; var folder = Windows.ApplicationModel.Package.Current.InstalledLocation; var file = await folder.GetFileAsync(path); var readFile = await Windows.Storage.FileIO.ReadLinesAsync(file); foreach (var line in readFile.OrderBy(line => { int lineNo; var success = int.TryParse(line.Split(';')[4], out lineNo);

Inherit UserControl and hooking up to basic property events

有些话、适合烂在心里 提交于 2019-12-23 05:40:57
问题 I'm making a custom TextBox for UWP to simplify Win2D outlined text solution, for that I created a UserControl that contains only a canvas on which I'll draw the text. Of course I need some properties, like text, outline thickness and color, etc... I also need some properties that are already exposed by the inherited UserControl like Foreground, FontSize, FontFamily... So far so good, it seems like I won't need to implement each one of those common properties. The problem is that I can't find

Does Windows 10 Mobile support the Fluent Design System for UWP apps?

巧了我就是萌 提交于 2019-12-23 05:11:57
问题 I'm developing a new UWP app with the Fluent Design System (Acrylic Background and reveal) but apart from being available on Windows 10 Desktop, I also want to publish the application to Windows 10 Mobile. Does Windows 10 Mobile support the Fluent Design System? Or do I have to develop another application just for Windows 10 Mobile without the Fluent Design System? 回答1: Windows 10 Mobile build 10.0.15063 (Creators Update) supports composition effects as well as in-app acrylic (see How to use

UWP ListView: How to expand an item when select it?

允我心安 提交于 2019-12-23 04:37:09
问题 I have a listview containing some item. And I want to expand the item to show detail information when I select one item, what should I do? 回答1: I didn't check the CustomControl carefully which provided by @AVK Naidu, which is good and seems can solve your problem. But I need to say here, it is totally possible to do this work with the default ListView control, what you need is just changing the DataTemplate for your ListViewItem when it is selected. Just for example here: <Page.Resources>

UWP resource strings at design time (.resw)

会有一股神秘感。 提交于 2019-12-23 02:18:32
问题 I've created a .resw file by following the instructions at https://docs.microsoft.com/en-us/windows/uwp/globalizing/put-ui-strings-into-resources. While the localization works fine at runtime, no text is displayed at design time. The only solution proposed so far seems to only work in windows 8.1 apps: Windows store app ResourceLoader at design time 回答1: The New Method of solution that you have mentioned also works in UWP. And it's more recommended to use Data Binding at design time. The

How to solve DEP6500 and DEP6701 errors?

无人久伴 提交于 2019-12-22 18:33:40
问题 I have a project called BTLE in its own solution. Loading the project and running it with the debugger on the phone works find. I have a second solution that Loads and compile fine as well. I added the BTLE project (Add/Existing Project) to the second solution, compiled it and tried to run it in the debugger. I can see the application was loaded fine to the phone (I can run it from the phone), but the debugger will not start and I am getting the following error messages: 1>------ Deploy