1

Topic: Dictionary <string, float> to one of columns ListView

Good afternoon.
Is ListView with several columns (GridViewColumn).
For example:

&lt;GridViewColumn Header = "an event Title" DisplayMemberBinding = "{Binding EventName}" Width = "150"/&gt;

It would be desirable to anchor to one of columns Dictionary &lt;string, float&gt; dict.
How it can be made?

2

Re: Dictionary <string, float> to one of columns ListView

MyDict = new Dictionary &lt;string, float&gt; ()
{
{"KeyA", 1.0f};
{"KeyB", 2.0f};
{"KeyC", 3.0f};
};
&lt;TextBlock Text = "{Binding MyDict [b]}"/&gt;

3

Re: Dictionary <string, float> to one of columns ListView

Roman Mejtes wrote:

&lt;TextBlock Text = "{Binding MyDict [b]}"/&gt;

fix

&lt;TextBlock Text = "{Binding MyDict [KeyB]}"/&gt;

4

Re: Dictionary <string, float> to one of columns ListView

Roman Mejtes;
Elements in MyDict are added dynamic in application before creation ListView, i.e. I cannot register in that form that you offered.
By the way, and if

MyDict = new Dictionary &lt;string, float&gt; ()
{
{"KeyA", 1.0f};
{"KeyB", 2.0f};
{"KeyC", 3.0f};
};

Whether that can be anchored to one column MyDict that it was deduced
In single line: KeyA 1.0; KeyB 2; Keyc 3
?

5

Re: Dictionary <string, float> to one of columns ListView

The decision is found, thanks for the help.