Why does my listviewitem lose its content in a dockpane?

541
1
04-16-2020 07:44 AM
by Anonymous User
Not applicable

With SDK 2.5 I add a new DockPane to my addin module, and put a listview on it with some listviewitems.

In the document outline I right click and choose add a copy ...

I remove the style from the middle item ...

I see it at design time ...

But not at run time ...

At runtime the visual tree for the middle listviewitem  has no children ...

I see no mention of listviewitem in the style guide:

ProGuide Style Guide · Esri/arcgis-pro-sdk Wiki · GitHub 

Am I doing something wrong?

Tags (2)
0 Kudos
1 Reply
DavidWilton
Occasional Contributor

Hi Kirk,

 we had this one too, was puzzling us because the list works find outside of pro. The esri Pro team helped us out. You need the ItemContainerStyle below"

  <ListView Grid.Row="1" ItemsSource="{Binding Items, Mode=TwoWay}" ItemContainerStyle="{DynamicResource Esri_ListBoxItemHighlightBrush}">
            <ListView.ItemTemplate>
                <DataTemplate>
0 Kudos