listview

WPF accessing scrollviewer of a listview codebehind

不打扰是莪最后的温柔 提交于 2021-01-27 05:27:08
问题 I need to access the scrollviewer of a listview from the codebehind. here is the definition of my listview <ListView Grid.Row="1" ItemsSource="{Binding Path=SpecList, UpdateSourceTrigger=PropertyChanged}" Name="mylistview" ItemTemplate="{StaticResource SpecElementTemplate}" Background="{StaticResource EnvLayout}" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Disabled" ItemContainerStyle="{StaticResource MyStyle}" BorderBrush="Blue"

Android Espresso listView scroll to

白昼怎懂夜的黑 提交于 2021-01-27 04:52:07
问题 I have a list_view, which I want to test. list_view item layout is RelativeLayout , adapter is ItemAdapter . This code works fine (item contatining Daft Punk is visible): @Test public void listViewTest() { Espresso.onView(withText("Daft Punk")).perform(click()); } Both of this variants fail: (The scrolling starts, comes to the item and then fails, the error is at the very and of this question.) @Test public void listViewTest() { Espresso.onData(artistWithName("Imagine Dragons")).perform

Android Espresso listView scroll to

烈酒焚心 提交于 2021-01-27 04:51:39
问题 I have a list_view, which I want to test. list_view item layout is RelativeLayout , adapter is ItemAdapter . This code works fine (item contatining Daft Punk is visible): @Test public void listViewTest() { Espresso.onView(withText("Daft Punk")).perform(click()); } Both of this variants fail: (The scrolling starts, comes to the item and then fails, the error is at the very and of this question.) @Test public void listViewTest() { Espresso.onData(artistWithName("Imagine Dragons")).perform

Display message when ListView contains no items with MVVM in a UWP

[亡魂溺海] 提交于 2021-01-21 08:33:37
问题 This is my first MVVM project and the code I need to write to manipulate controls in the view somehow seems way too complicated than it has to be. I'm finding it hard to fully understand MVVM and to decide when I can put stuff in code behind. Basically my problem is that I want to show a message telling the user that the listview is empty when the ObservableCollection it is bound to contains no items. The idea was to have a TextBlock in the view and only have its visibility property set to

How to clear an Android ListView and populate it with new data?

99封情书 提交于 2021-01-21 07:37:35
问题 I have a spinner and a listview in the same Activity. The listview is loaded with a list of items. i want when user clicks on the item from spinner the listview will be clear and new listview will load according to item chooses in spinner setListAdapter(new ArrayAdapter<String>(this, R.layout.listviewxml, video)); ListView lv=getListView(); lv.setTextFilterEnabled(true); Please tell how to do this? i am not able to clear the listview 回答1: If you have passed a List or an Array to the Adapter ,

WPF ListView Selecting Multiple List View Items

帅比萌擦擦* 提交于 2021-01-20 19:12:56
问题 I am figuring out a way to Select Multiple items in list view and deleting them on a certain action. What I can't figure out is, how should I have these multiple items selected? I would think there is a list that I would need to add them all into, but what's the best way to approach this situation, do you have any ideas? Thanks! -Kevin 回答1: Set SelectionMode to Multiple or Extended and iterate through theSelectedItems in your ListView . 回答2: I would suggest do not use the SelectedItems

A ListView with only one column is showing its items in two columns

孤街浪徒 提交于 2021-01-20 12:40:33
问题 I have a column of four values (depending on number of attached screens on the users's computer). I am trying to use a ListView as I've found an example where I can grey out the unavailable screens. However the list of four items is being shown in two columns like this: Screen 1 Screen 3 Screen 2 Screen 4 I have tried changing the width of the column and the control, but without success. WHY? I was thinking that maybe the first column is a header column so have tried adding two columns and

Error Get Value TextEditingController In Flutter

早过忘川 提交于 2021-01-07 01:35:11
问题 I want to retrieve the value from textEditingController with a loop, the problem that occurs when the listview is not scrolled will result in an error, "RangeError (index): Invalid value: Not in inclusive range 0..23: 24", I have random data of 40 records, the application will run properly when scrolling to the end of the line. I want even though I don't scroll down the data can still be retrieved without error. you can run my sample code, please help me thanks. import 'dart:math'; import

Flutter listview builder Scroll controller listener not firing inside list view?

一个人想着一个人 提交于 2021-01-06 05:01:11
问题 I have a listview builder widget inside another list view. Inner listview listener is not firing when scrolling position reaches to its end. initState() { super.initState(); _scrollController.addListener(() { if (_scrollController.position.maxScrollExtent == _scrollController.position.pixels) {function();} } Container( child: Listview( children: <Widget>[ Container(), ListView.builder( controller: _scrollController, physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: list

Flutter listview builder Scroll controller listener not firing inside list view?

大憨熊 提交于 2021-01-06 05:00:11
问题 I have a listview builder widget inside another list view. Inner listview listener is not firing when scrolling position reaches to its end. initState() { super.initState(); _scrollController.addListener(() { if (_scrollController.position.maxScrollExtent == _scrollController.position.pixels) {function();} } Container( child: Listview( children: <Widget>[ Container(), ListView.builder( controller: _scrollController, physics: NeverScrollableScrollPhysics(), shrinkWrap: true, itemCount: list