我正在 WPF 中研究基础设施 XamDataChart。我想并行创建 2 个图例。我可以这样做,但是这两个传奇之间有很多空间。我希望它们彼此相邻,这样它们之间就没有空间了。所以在视觉上它看起来像一个 2 列图例。
代码很简单
<ScrollViewer VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,-44,140,0" VerticalScrollBarVisibility="Hidden">
<StackPanel Orientation="Horizontal">
<ig:Legend x:Name="xamLegend1" Orientation="Vertical" FontFamily="Calibri" FontSize="12" Foreground="#FFFFFF" Background="#34678F" ></ig:Legend>
<ig:Legend x:Name="xamLegend2" Orientation="Vertical" FontFamily="Calibri" FontSize="12" Foreground="#FFFFFF" Background="#34678F" ></ig:Legend>
</StackPanel>