uwp

Windows Universal Apps: Call python method from C# [closed]

你。 提交于 2019-12-04 06:26:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I have a .py file I want to call and get the value it returns in my App. My main intention is to use scikit-learn for machine learning within my C#-based Universal App, how would I accomplish that? 回答1: In UWP your options are pretty limited. Universal applications run in a

How to load images to a page as soon as they are loaded from a folder in UWP

こ雲淡風輕ζ 提交于 2019-12-04 06:22:23
问题 I'm using the AdaptiveGridView to load a list of images from a folder onto the page. my question is how can i load an image as soon as it's become ready and not have to wait for the entire list of images to be processed. Here's my code: C# public class Images { public ImageSource ImageURL { get; set; } public string ImageText { get; set; } } private List<Images> ImageCollection; private async void Button_Click(object sender, RoutedEventArgs e) { ImageCollection = new List<Images>(); // pick a

UWP 带左右滚动按钮的横向ListView———仿NetFlix首页河的设计

最后都变了- 提交于 2019-12-04 06:21:55
1. 需求 也是之前写的控件了,模仿NetFlix的河的设计。 大体要求如下: 1. 横向的ListView 2. 左右按钮,可以左右移动河卡片,左右的滚动条不可见 3. 左右按钮仅在鼠标Hover事件中可见 大家可以看下NetFlix uwp版,国内爱奇艺也是这样设计的,芒果TV之前是,但是新版去掉了这种风格。 其实我也是一个菜鸟,一开始纠结怎么写这个控件,怎么传递ItemsSource,而且还在SO上发起了提问 How to customize a horizontal listview with left/right button on uwp? 很遗憾,uwp几乎灭绝,没有人回答我的问题。于是各种寻找,终于发现了大神 Pieter Nijs 写的文章 https://blog.pieeatingninjas.be/2016/01/17/custom-uwp-control-step-through-listview/ 大神的需求和我的类似,见图 于是膜拜文章,写下了适合我自己的控件见图: 2. 实现 👌好了,下面开始撸代码,先新建一个用户控件,名字叫 StepThroughListView ,看看Xaml的布局, <Grid> <ListView x:Name="ListViewRiver" HorizontalAlignment="Stretch"

UWP - Perform long view model creation and keep UI responsive

帅比萌擦擦* 提交于 2019-12-04 06:17:57
问题 I've build this example to show my issue. I need to create a hierarchy to be shown in a treeview, treeview to be bound to the view model. In the good old days of VB6 I would have used DoEvents to unlock the UI but here I'm not able to understand how to proceed. On VS19 create a blank UWP project and call TestLoadSync it then copy paste this in the files: App.xaml.cs using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices

Send speech recognition args.Result as parameter in UWP desktop-bridge package

拜拜、爱过 提交于 2019-12-04 06:16:12
I'm trying to figure out, if it is possible send using Windows.Media.SpeechRecognition; args.Result.Text as parameter from UWP to Console application. For example by following scenario I'm sending TextToSpeech(args.Result.Text); with args.Result.Text; value, where using Windows.Media.SpeechSynthesis; text-to-speech pronounces the recognition result each time when args.Result.Text; appears. textBlock2.Text = args.Result.Text; also displays result: private async void ContinuousRecognitionSession_ResultGenerated( SpeechContinuousRecognitionSession sender,

Why are my Xamarin UWP Images not showing up on device?

拜拜、爱过 提交于 2019-12-04 06:06:28
问题 I am developing a Xamarin UWP app using ffimageloading. The images show up just fine on the Windows Phone emulator that I am running through Visual Studio, but when I deploy it to a device through the device portal all of the images are missing. <ffimageloading:CachedImage Grid.Column="0" Grid.Row="1" Source="{helpers:ImageResource MyProject.Assets.Images.music-doublenote.png}" /> 回答1: The issue was the build configuration. By turning off "Compile with .NET Native tool chain" on the Build tab

Windows 10 Universal Merged Dictionaries

浪尽此生 提交于 2019-12-04 05:56:05
So I have a Windows Universal Class Library that has a resource dictionary in it that I want to merge with my Windows 10 Universal Application's main resource dictionary in App.xaml. My App.xaml simply merges in my main Resource dictionary from the same assembly. <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Styles/Styles.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> Then from my main resource dictionary (Styles/Styles.xaml) I am merging in other resource dictionaries from the

UWP VisualStateManager PointerOver does not work

冷暖自知 提交于 2019-12-04 05:34:39
问题 I am mimicking the behavior of Groove Music, which displays a drop shadow effect when mouse hovers on an album cover (in my code it's the entire DataTemplate). But My VisualStateManager doesn't seem to work. Any ideas? I have implemented that programmatically but I want to use xaml to do that for practice. ---Update--- Changing Stackpanel to Grid still doesn't make things work. <GridView Grid.Row="1" Margin="10" IsItemClickEnabled="True" ItemsSource="{x:Bind Albums}"> <GridView.ItemTemplate>

How to load ItemsSource before setting SelectedItem in ListView?

只愿长相守 提交于 2019-12-04 05:28:41
问题 I have a MVVM page that contains a ListView . I bind ItemSource and SelectedValue , but first time it calls converter for SelectedValue then loads ItemSource . <ListView x:Name="ListViewSurahs" ItemsSource="{Binding MyItems}" FlowDirection="LeftToRight" Grid.Column="2" Grid.Row="4" VerticalAlignment="Top" HorizontalAlignment="Left" HorizontalContentAlignment="Center" SelectionMode="Single" ScrollViewer.VerticalScrollBarVisibility="Auto" DisplayMemberPath="Name" SelectedValuePath="ID"

MvvmCross MvxWindowsPage<TViewModel> compilation error

纵饮孤独 提交于 2019-12-04 05:28:36
问题 I am writing a Xamarin.iOS , Xamarin.Android and UWP cross-platform application with the MvvmCross framework. I am making a LoginPage which has a LoginViewModel. In the Xamarin.iOS , Xamarin.Android projects, the binding of the ViewModel and the View with below works just fine public class LoginActivity : MvxAppCompatActivity<LoginViewModel> public partial class LoginViewController : MvxViewController<LoginViewModel> Trying to do the same as above on UWP project, I get some error. In XAML: