使用ADO.net和RIA的树状图 [英] Treemap using ADO.net and RIA

查看:85
本文介绍了使用ADO.net和RIA的树状图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!请帮助

我正在尝试使用SQL数据库将Silverlight树形图绑定到ADO.net实体数据模型.我可以将数据加载到数据网格中.但是,我无法获取树形图来加载数据.我哪里出问题了?

Hi! Please Help

I am trying to bind a silverlight treemap to ADO.net Entity Data Model using a SQL database. I can get the Data to load into a datagrid. I cant however get the Treemap to load the data. Where have I gone wrong?

<riaControls:DomainDataSource Name="domainDataSource1" QueryName="GetOverviews" AutoLoad="True">
            <riaControls:DomainDataSource.DomainContext>
                <ds:DataDomainContext />
            </riaControls:DomainDataSource.DomainContext>
            <riaControls:DomainDataSource.FilterDescriptors>
                <riaControls:FilterDescriptor PropertyPath="BU" Operator="IsEqualTo" Value="Utilities" />
            </riaControls:DomainDataSource.FilterDescriptors>
        </riaControls:DomainDataSource>

<StackPanel Grid.Row="1">
                <datavis:TreeMap x:Name="TreemapControl">

                <datavis:TreeMap.Interpolators>
                    <datavis:SolidColorBrushInterpolator TargetName="itemContainer" TargetProperty="Background"

                                                       DataRangeBinding="{Binding M_Status}" From="Red" To="Green" />
                </datavis:TreeMap.Interpolators>

                <datavis:TreeMap.ItemDefinition>
                        <datavis:TreeMapItemDefinition   ItemsSource="{Binding ElementName=domainDataSource1, Path=Data}" ValuePath="{Binding IO}">

                        <DataTemplate>
                            <Border x:Name="itemContainer" Background = "red"  BorderBrush="red" BorderThickness="1" >
                                <TextBlock  VerticalAlignment="Center" TextWrapping="Wrap"/>
                            </Border>
                        </DataTemplate>

                    </datavis:TreeMapItemDefinition>
                </datavis:TreeMap.ItemDefinition>

            </datavis:TreeMap>
            </StackPanel>
        </Grid>
  </Grid>
</UserControl>

推荐答案

您正在使用silverlight工具箱树状图控件,我想
出了问题
you are using silverlight toolkit treemap control, I guess something is wrong with
<datavis:TreeMapItemDefinition   ItemsSource="{Binding ElementName=domainDataSource1, Path=Data}" ValuePath="{Binding IO}">

代码段检查所有绑定.您是否正在从数据库中获取这些属性的值.调试应用程序并检查值,因为很难看到所有代码.

您可以参考Silverlight工具箱4源代码来显示树状图.

有关更多查询,请在此处评论!

希望对您有所帮助:)

piece of code check all bindings. Are you getting the values for these properties from database. Debug the application and check the values as it is very difficult to say with out seeing all the code.

you can refer to Silverlight toolkit 4 source code for displaying treemap.

for further queries comment here!

hope it helps :)


这篇关于使用ADO.net和RIA的树状图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆