uwp

UWP c# Binding to ItemsPanel / Custom Panel (Template)

好久不见. 提交于 2019-12-24 13:35:39
问题 I finally managed to create a GridView with my own Panel. The Layout is fine. Now I want to be able to Bind Values of my ViewModel to my own Panel. Can you help me doing this. For the moment I'm changing the values in the code behind of the page, which I don't like... For the moment I'm trying to do the x:Bind and I get an error: "Object reference not set to an instance of an object." I don't know if "normal" Binding will help. I did try it but with no success. Custom Panel public class

INotifyPropertyChanged not working with traditonal binding but works with compiled binding

此生再无相见时 提交于 2019-12-24 12:51:38
问题 I don't if I am doing something wrong or if there is something I am missing but the INotifyPropertyChanged works when I do it with compile time binding and doesn't work when I do it with traditional binding. public class Students : INotifyPropertyChanged { private string name; private string surname; public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged([CallerMemberName] string propertyName = "") { if (PropertyChanged != null) { PropertyChanged(this,

Rotate vehicle pin on MapControl according to the path - Uwp C#

不想你离开。 提交于 2019-12-24 11:16:01
问题 My app is moving a vehicle on specified route using below code. But the image of vehicle used is like it's front side is facing to left. How can I rotate the face of car on the way it goes? I'm referring this link to move the car. My Code : private void MovePinOnPath(bool isGeodesic) { Image forImage = new Image { Width = 40, Source = CarIconSource, }; BasicGeoposition geoposition = new BasicGeoposition(); geoposition.Latitude = CarDetailsList.CodeArray[Startpt_index].CarLat; geoposition

UWP Listview in Gridview not increasing

狂风中的少年 提交于 2019-12-24 10:57:16
问题 I've got a GridView to display some data. Each of the GridView items is a ListView which is increasing during runtime. I'd like the GridView to increase as well - but it is only showing a scrollbar inside the GridView item. One further requirement would be that each GridView Item should be aligned on top of the item. <GridView ItemsSource="{Binding}" ScrollViewer.VerticalScrollBarVisibility="Disabled" Width="1080"> <GridView.ItemTemplate> <DataTemplate> <ListView ItemsSource="{Binding

Windows UWP - Dynamically Load Assembly In Side Loaded App

天涯浪子 提交于 2019-12-24 10:56:35
问题 It seems to be a deliberate security of Windows 10 Store apps that assemblies not be allowed to be loaded at runtime. I think that this feature is massive overkill and stops UWP development dead in its tracks. However, if it is a rock solid design decision by Microsoft, there is nothing we can do to argue with it. Instead, I'd like to ask the question, assuming that you were not deploying your UWP app to the store, would it still be impossible to load an assembly dynamically? If it's possible

Remove space that the primary and secondary buttons are holding on a ContentDialog

六眼飞鱼酱① 提交于 2019-12-24 10:48:03
问题 I am writing a ContentDialog which is a part of a UWP app, I don't need the default PrimaryButton and SecondaryButton. There will be a thick padding on the bottom of the dialog if I don't define the buttons. Please see the screen shot attached. Is there a way to remove the space? Thank you. 回答1: You can create a new Style for this dialog removing the Grid which contains the button space. Open the file file , search for ContentDialog, copy the default style in your app, give it an x:Key and

UWP Webview NavigationStarting event handler is not working when URL is not Valid

拥有回忆 提交于 2019-12-24 10:38:33
问题 Subscribe EvenHandler : wv.NavigationStarting += webView_NavigationStarting; EvenHandler Implementation private static void webView_NavigationStarting(object sender, WebViewNavigationStartingEventArgs args) { var url = args.Uri.AbsoluteUri.Substring(args.Uri.AbsoluteUri.LastIndexOf("/") + 1); int parameterCount = url.Split('_').Length; } When URL is valid it navigates perfectly fine, otherwise EvenHandler was not called. And the pop up below shows: 回答1: You can use the WebView

How to create video with overlays in UWP?

喜欢而已 提交于 2019-12-24 10:28:18
问题 I'm using MediaComposition to create an edited video. The composed video will be: One video clip A set of images (overlay frames) that should be shown on top of it. The result should be like this: https://www.youtube.com/watch?v=cFEkkQIYGBc My current code looks like this. Each frame is an abstraction of the overlay image. I called it frames private async Task ExportFrames(IEnumerable<OverlayFrame> frames, IStorageFile inputFile, IStorageFile outputFile) { var folder = await ApplicationData

I can not build the generated UWP project by Zebble

非 Y 不嫁゛ 提交于 2019-12-24 10:26:07
问题 I created a sample project using Zebble Extension for Visual Studio. The related projects created successfully but unfortunately when I tried to compile the UWP project, the build process failed with the following error: Validation error. error C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 10, Column 13, Reason: '$solutionname$' violates pattern constraint of '[-.A-Za-z0-9]+'. The attribute 'Name' with value '$solutionname$' failed to parse. How

Sliding elements in c# UWP

本秂侑毒 提交于 2019-12-24 10:25:50
问题 I have a question about animations in UWP. I want to have a menu on the bottom of my app that, when tapped on the top, slides up (shows) or down (hides almost entirely). I was learning WPF before and there I know I can use ThicknessAnimation to move the margin of my control and have it slide. Unfortunately, in UWP I can't use ThicknessAnimations, so I tried to find another way. I want this to work for an arbitrary FrameworkElement (so as to be able to reuse it). Eventually, I came up with