uwp

How to update the GridView after binded itemsource is updated in UWP?

こ雲淡風輕ζ 提交于 2019-12-24 17:23:54
问题 I need to refresh the GridView when values changed in the List collection. Actually I have bind the List as itemsource for the GridView. Where i have changed the List values but which could not relected in the GridView. How to acheive this in UWP? 回答1: use ObserableListCollection and yourGridviewOrListview1.ItemsSource = null; yourGridviewOrListview1.ItemsSource = SingletonClass.YourObList; 回答2: To update the GridView if entries in your list are added, removed or moved you should use an

How to programmatically select a bound `NavigationViewItem` of `NavigationView` after binding is updated

痞子三分冷 提交于 2019-12-24 17:10:08
问题 My setup is basically as follows: NavigationView 's MenuItemsSource is bound to viewModel.NavItems . NavItems is a computed property of viewModel . The view model class implements INotifyPropertyChanged for binding purpose Books of view model is loaded asynchronously . What works The NavigationViewItem s show up after the page is reached. The Problem I need to set a specified NavigationViewItem as the SelectedItem of the NavigationView . But there's no NavigationViewItem (from viewModel ) to

UWP to launch my application from WPF application

两盒软妹~` 提交于 2019-12-24 16:44:08
问题 I have a Windows store app I want to run (if not running) or expand (if not expanded) of another of my app written in WPF. Through The Process.Start() I could not do. Tell me, can this be done? Thanks for the help! 回答1: To launch an UWP app from another app, you could make use of deep linking. Here is a great article describing exactly how to do that In summary, you need to add a protocol declaration (essentially a URL with a custom scheme), handle the activation event and then you can launch

Bind Obserable Collection to MenuFlyoutSubItem in UWP

北城以北 提交于 2019-12-24 16:18:58
问题 Currently I get "The property "Items" does not have an accessible setter." How could I modify this control to allow me to bind a collection to it and maybe just set on of the properties of the objects in the collection to the text property of the items? <AppBarButton x:Name="Button" Icon="Add" Label="stuff"> <AppBarButton.Flyout> <MenuFlyout> <MenuFlyoutItem Text="b1" ></MenuFlyoutItem> <MenuFlyoutItem Text="b2" ></MenuFlyoutItem> <MenuFlyoutItem Text="b3" ></MenuFlyoutItem> <MenuFlyoutItem

Styling ListView hovered/selected state for Universal Windows Platform

三世轮回 提交于 2019-12-24 16:03:39
问题 I would like to change the default styling of ListView in a Universal Windows Platform app. The default ListView item has a light gray color for hover, light blue for clicked, darker blue for selected item. I tried to search and I have tried almost every piece of code, but without success. This is my xaml for ListView: <Page.Resources> <DataTemplate x:Key="MasterListViewItemTemplate" x:DataType="model:Thread"> <Grid Margin="0,11,0,13"> <Grid.ColumnDefinitions> <ColumnDefinition Width="35"/>

XmlReader is declared in a different Assembly even though System.Xml is referenced?

怎甘沉沦 提交于 2019-12-24 15:58:58
问题 I am a student studying Computer Engineering in University, and I am trying to develop an application that will read an rss feed from a certain url, then display the titles and links of each item in the feed as a notification whenever a the feed on the url is updated. Well, I am actually at the very beginning, and I am working on this project for learning purposes, following some tutorials etc. My plan was to use System.ServiceModel.Syndication library to read the rss feed from the url using

Possible to Stream wav File to Windows.Media.SpeechRecognition?

天大地大妈咪最大 提交于 2019-12-24 15:51:53
问题 Is there an out-of-the-box solution to stream a wav file/memory to a UWP app? Windows.Media.SpeechRecognition looks like it only accepts microphone input. Is there a way to use System.Speech.Recognition in a UWP app? Is there an official way to use Windows.Media.SpeechRecognition in a Windows desktop app? 回答1: Please check Speech APIs, this is a set of REST API provided by Microsoft which can accept wav files. 回答2: You can use VB-Audio Virtual cable http://vb-audio.pagesperso-orange.fr/Cable

Unit test UWP app with NUnit on VS2015

混江龙づ霸主 提交于 2019-12-24 15:36:53
问题 I spent far too much time trying to run a basic NUnit test on a Microsoft Store app. I installed NUnit v3.0.1 and NUnit3TestAdapter on VS2015 Pro but I get the following which confirms that the test is not discovered: ------ Discover test started ------ NUnit Adapter 3.0.8.0 discovering tests is started Exception NUnit.Engine.NUnitEngineException, Exception thrown discovering tests in <project exe file> The NUnit 3.0 driver does not support the portable version of NUnit. Use a platform

x:Bind and nested class in a UWP application

雨燕双飞 提交于 2019-12-24 13:52:30
问题 I am currently working on a UWP application and I would like to use the compiled binding system. I have a base that extends the Windows.UI.Xaml.Controls.Page that contains a property ViewModel . Here the base class of the ViewModel Property : public class BaseViewModel : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected void RaiseOnPropertyChanged([CallerMemberName] string propertyName = "") { OnPropertyChanged(propertyName); } public void

Behavior SDK - ChangePropertyAction generates argument exception in runtime when compiling with .net native

岁酱吖の 提交于 2019-12-24 13:50:11
问题 I'm using DataTrigerBehavior from Behaviors SDK to change System.Windows.Shapes.Path.Data property according to the value of other propery, this is a part of my code: <Path x:Name="ItemPath" Stretch="Uniform" Grid.Column="0" Fill="#FF646464" Stroke="{x:Null}" StrokeThickness="3"> <Interactivity:Interaction.Behaviors> <Core:DataTriggerBehavior Binding="{Binding FType, Converter={StaticResource EnumToStringConverter}}" Value="Parent"> <Core:ChangePropertyAction TargetObject="{Binding