Quest: WPF & listview item selection...

B

Brandon

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...
 
A

Alun Harford

Brandon said:
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
 
B

Brandon

It's hard to help without some more detailed information.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...
 
A

Alun Harford

Brandon said:
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
 
B

Brandon

Basically, you can't. Once you've retemplated a control, the defaultOK I guess I will have to wait till the next srv pack for the default...
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top