当我在Visiblox图表中显式设置图例的宽度时,我发现图例项文本被截断,而不是换行。例如,
<Style x:Key="LegendStyle" TargetType="{x:Type charts:Legend}">
<Setter Property="Width" Value="200" />
</Style>
<charts:Chart Name="chart" LegendStyle="{StaticResource LegendStyle}" />我知道我可以使用图表控件的LegendTemplate属性为图例类提供ControlTemplate。但是,我不确定如何修改它以便在子LegendItem控件中产生文本换行。我也不确定如何修改用于绘制LegendItem控件的模板以生成文本换行。有没有办法做到这一点?
发布于 2011-07-25 23:12:42
提供LegendItemTemplate或LegendItemStyle可能更容易。这些是序列类型的依赖属性。您可以在documentation的“样式和模板”部分中获得更多信息。
https://stackoverflow.com/questions/6796367
复制相似问题