Using Viewbox in Treemap DataTemplate causes blurry text in VS2010 Extension

Nov 30, 2010 at 3:17 AM
Edited Nov 30, 2010 at 3:18 AM

Hi,

I am interested in using the Treemap control in WPF Toolkit for visualization of a data set in my VS2010 Extension. As written up in David Anson's blog post, I used a Viewbox to scale the text. However this produces blurry text in the extension in the VS IDE.

Snapshot

  • I copied over this snippet into a temp WPF App and the text was crisp unlike before.
  • I commented out the viewbox, as expected the text didn't scale in the extension but the text was not blurry anymore.

Any ideas on how to solve this ?

 

<datavis:TreeMap Grid.Row="2"  Grid.Column="0"
                                         ItemsSource="{Binding GroupedAnnotations}">
                            <datavis:TreeMap.ItemDefinition>
                                <datavis:TreeMapItemDefinition ValuePath="Count">
                                    <DataTemplate>
                                        <Grid Margin="0 0 5 5" >
                                            <Border BorderThickness="1" BorderBrush="Maroon"  x:Name="myBorder">
                                                <Grid>
                                                    <Viewbox>
                                                        <TextBlock Text="{Binding Count}" FontFamily="Segoe UI" FontSize="12"/>
                                                    </Viewbox>
                                                </Grid>
                                                <ToolTipService.ToolTip>
                                                    <StackPanel Orientation="Horizontal">
                                                        <TextBlock Text="{Binding Text}"/>
                                                    </StackPanel>
                                                </ToolTipService.ToolTip>
                                            </Border>
                                        </Grid>
                                    </DataTemplate>
                                </datavis:TreeMapItemDefinition>
                            </datavis:TreeMap.ItemDefinition>
                        </datavis:TreeMap>