473,468 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Quest: WPF & listview item selection...

HI all,

I am working on a WPF listview that get items through the XMLDataProvider
and making a listview with two actual columns and in both CellTemplete XAML
in a grid bind more than one snippet of the XML data to the cell. Now this
works fine no problem...

When I try to setup a IsSelected trigger I lose the default listview
selection UI and only the new look of the ListViewItem after the trigger
takes effect shows what Item is selected. What is going on here with default
listview selection UI and can I get it back with the trigger in place too?

NOTE: For those that don't know what I mean by default listview selection UI
just open windows explorer and select a item and mouse over another - I want
that to work on the IsSelected trigger version of my listview for full row
selection...

Any help...

Oct 10 '08 #1
4 7441
Brandon wrote:
HI all,

I am working on a WPF listview that get items through the
XMLDataProvider and making a listview with two actual columns and in
both CellTemplete XAML in a grid bind more than one snippet of the XML
data to the cell. Now this works fine no problem...

When I try to setup a IsSelected trigger I lose the default listview
selection UI and only the new look of the ListViewItem after the trigger
takes effect shows what Item is selected. What is going on here with
default listview selection UI and can I get it back with the trigger in
place too?

NOTE: For those that don't know what I mean by default listview
selection UI just open windows explorer and select a item and mouse over
another - I want that to work on the IsSelected trigger version of my
listview for full row selection...

Any help...
It's hard to help without some more detailed information.

Can you post a short example of some code that shows your problem?

Alun Harford
Oct 11 '08 #2
>>It's hard to help without some more detailed information.
>
>>Can you post a short example of some code that shows your problem?
Thanks for your reply - well this example is not my work but example shows
the problem...

There is a zip with the WPF listview example at the of Beatriz Costa's
blog... "http://www.beacosta.com/blog/?cat=9"

The zip was easy for me to compile and run has is... The exe shows the WPF
Listview similar to mine and like her example I show extra information for
the selected item and like her example I lose the default listview selection
UI when the IsSelected trigger is in play.

Also if you edit her or my example and cut out the triggers(deleting the
trigger's xaml open/close tag and tag's inner content) and run example the
Listview completely render more as a picture(no selection IU) of a Listview
execpt the Listview Header still works...

So now how can I get the default Listview selection UI to work with the
IsSelected trigger is in play also?

Any more help...

Oct 11 '08 #3
Brandon wrote:
>>It's hard to help without some more detailed information.
>>Can you post a short example of some code that shows your problem?
Thanks for your reply - well this example is not my work but example
shows the problem...

There is a zip with the WPF listview example at the of Beatriz Costa's
blog... "http://www.beacosta.com/blog/?cat=9"

The zip was easy for me to compile and run has is... The exe shows the
WPF Listview similar to mine and like her example I show extra
information for the selected item and like her example I lose the
default listview selection UI when the IsSelected trigger is in play.

Also if you edit her or my example and cut out the triggers(deleting the
trigger's xaml open/close tag and tag's inner content) and run example
the Listview completely render more as a picture(no selection IU) of a
Listview execpt the Listview Header still works...

So now how can I get the default Listview selection UI to work with the
IsSelected trigger is in play also?
Basically, you can't. Once you've retemplated a control, the default
template is no longer involved.

You can download the default template and modify it, but that's probably
a bad idea.

Alun Harford
Oct 11 '08 #4
>>Basically, you can't. Once you've retemplated a control, the default
>>template is no longer involved.
OK I guess I will have to wait till the next srv pack for the default...
>>You can download the default template and modify it,
but that's probably a bad idea.
What is a good idea direction to look toward say creating a non-standard
like say for starts a ##% transparent solid color full row selection and
mouse over bars.

Should all I need to do it mess with the IsSelected trigger some more and
add a mouse over trigger too...

Any more help...

Oct 12 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: InvisibleDuncan | last post by:
I have a ListView that populates some fields whenever the user selects an item. However, if they change the data in the fields and then select a new item without saving, I want to display a message...
1
by: Bob Geltz | last post by:
I am able to populate a ListView with several detail lines (several columns). When finished, I would like to pre-select the first item in the list (before the user interacts with the list). This...
6
by: Vanessa | last post by:
With this program I can do one selection, but upon the second I get an error where ///////////////// is indicated. Please help. using System; using System.Drawing; using System.Collections;...
1
by: youngie | last post by:
I've got a listview on a form in report style. It's populated with 40 item. I want to prevent the used clicking on some items, and if the user clicks on one of these items I want the selection to...
2
by: Dolorous Edd | last post by:
Hi, for a program I'm working on I need to be able to drag multiple files between Windows Explorer and a ListBox, in both directions. Implementing the "drag in" was pretty easy, but I can't find...
6
by: Brandon McCombs | last post by:
Hello, I have a form that contains a listview on the left side and a column of buttons on the right side. Only some of the buttons do I want enabled all the time. The other buttons should be...
5
by: Jure Bogataj | last post by:
Hi all! I have a problem (performance issue) with listview. I have implemented an ItemSelectionChange on my listview and put some code in it (I build some toolbar based on selection and update...
12
by: Tom Bean | last post by:
I am trying to display a ContextMenuStrip when a user right-clicks on an item in a ListView and have encountered a something that seems strange to me. When the ListView is initially populated,...
0
by: Brandon | last post by:
Hi there... I got a WPF project that I am trying to select a ComboBoxItem in a ComboBox based on a string from the selected ListView item in the project... This ComboBox is unbound now and the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.