Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7004009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:08:36+00:00 2026-05-27T21:08:36+00:00

I am trying to bind some diagrams to a dictionary of string, int, and

  • 0

I am trying to bind some diagrams to a dictionary of string, int, and I am using a view-viewmodel pattern.

I have bound the dictionary already to a bar-diagram, but now I would like to bind it to the treemap control from the WPF Toolkit. It’s not really documented anywhere online, except here for silverlight: http://blogs.msdn.com/marlat/archive/2009/07/10/treemap-control-comes-to-silverlight-toolkit.aspx

Can anyone help me fix the right binding to my control?

<DataVisualization:TreeMap x:Name="treeMapControl">

                            <DataVisualization:TreeMap.Interpolators>

                                <DataVisualization:SolidColorBrushInterpolator TargetName="itemBorder" TargetProperty="Background"

                                       DataRangeBinding="{Binding Source={StaticResource ShellVM},Path=CustodianEmailCount.Value}" From="Blue" To="Magenta" />

                                <DataVisualization:DoubleInterpolator TargetName="textBlk" TargetProperty="FontSize"

                                       DataRangeBinding="{Binding Source={StaticResource ShellVM},Path=CustodianEmailCount.Value}" From="8" To="15" />

                            </DataVisualization:TreeMap.Interpolators>



                            <DataVisualization:TreeMap.ItemDefinition>

                                <DataVisualization:TreeMapItemDefinition ItemsSource="{Binding Source={StaticResource ShellVM},Path=CustodianEmailCount.Key}" ValueBinding="{Binding Source={StaticResource ShellVM},Path=CustodianEmailCount.Value}" ChildItemPadding="1">

                                    <DataTemplate>

                                        <Border x:Name="itemBorder" BorderBrush="Black" BorderThickness="1" ToolTipService.ToolTip="{Binding ToolTip}">

                                            <TextBlock x:Name="textBlk"  Foreground="White" Text="{Binding Source={StaticResource ShellVM},Path=CustodianEmailCount.Key}" VerticalAlignment="Center" Margin="2,2,0,0"

                                   TextWrapping="Wrap" TextAlignment="Center"/>

                                        </Border>

                                    </DataTemplate>

                                </DataVisualization:TreeMapItemDefinition>

                            </DataVisualization:TreeMap.ItemDefinition>

                        </DataVisualization:TreeMap>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:08:36+00:00Added an answer on May 27, 2026 at 9:08 pm

    The Problem is that you keep calling “Binding Source={StaticResource ShellVM}” on every item which might cause (depend on your implementation). Anyway it’s not really the correct way of using it while implementing MVVM.
    The right way to do it is setting the father’s container (of even the complete view if you are implementing MVVM) DataContext which results its leaf to inherates the VM:

    DataContext={Binding Source={StaticResource ShellVM}
    

    and then for instance:

    Text = {Binding CustodianEmailCount.Key}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to bind some XAML code to a property in my ViewModel. <Grid
I'm trying to bind some indexes and they're corresponding strings so I tried using
I'm trying to bind to a Dictionary<Type,string> through xaml. The problem is, the indexer
I'm trying to bind a Label's 'Content' property to a property from some custom
When trying to use SPWeb.GetSiteData(SPSiteDataQuery) (Trying to bind some data to SPGridView), it throws
I'm trying to bind to some XML data from my WPF application. I've set
I'm trying to bind some list item links in jquery mobile to a click
I'm having some bad luck trying to bind a uniform 4x4 matrix. I'm targeting
I'm trying to bind some click events with jQuery. Everything works in Chrome, FF,
I am trying to bind a few WPF controls to a trie. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.