So i have this Dictionary:
Dictionary<string, double> _statistics;
And this is how this is looks like:
When I do a mouse right click I want to be able to copy the cell value.
How can I add this simple copy option that will mark only the specific cell and not all the row ?
Is there something that already exist in the ListView
?
Populate my ListView
:
foreach (KeyValuePair<string, double> item in _statistics)
listView.Items.Add(new MyItem { IP = item.Key, Percent = item.Value });
<ListView.View>
<GridView ColumnHeaderContainerStyle="{StaticResource ListViewHeaderStyle}">
<!-- ip address column -->
<GridViewColumn Width="200" Header="IP Address" DisplayMemberBinding="{Binding IP}" />
<!-- percent column sent -->
<GridViewColumn Width="200" Header="Percent" DisplayMemberBinding="{Binding Percent, StringFormat={}{0}%}"/>
</GridView>
</ListView.View>
public class MyItem
{
public string IP { get; set; }
public double Percent { get; set; }
}