WinRT XAML Toolkit Chart Control의 범례 항목에 스타일을 지정하고 싶습니다. WinRT XAML Toolkit 차트 컨트롤 : 범례 스타일을 지정하는 방법은 무엇입니까?
나는 소스 코드를 확인하고 다음과 같은 스타일의 발견 :<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:datavis="using:WinRTXamlToolkit.Controls.DataVisualization">
<Style
TargetType="datavis:Legend">
<Setter
Property="BorderBrush"
Value="Black" />
<Setter
Property="BorderThickness"
Value="1" />
<Setter
Property="IsTabStop"
Value="False" />
<Setter
Property="TitleStyle">
<Setter.Value>
<Style
TargetType="datavis:Title">
<Setter
Property="Margin"
Value="0,5,0,10" />
<Setter
Property="FontWeight"
Value="Bold" />
<Setter
Property="HorizontalAlignment"
Value="Center" />
</Style>
</Setter.Value>
</Setter>
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="datavis:Legend">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition
Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<datavis:Title
Grid.Row="0"
x:Name="HeaderContent"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
Style="{TemplateBinding TitleStyle}" />
<ScrollViewer
Grid.Row="1"
VerticalScrollBarVisibility="Auto"
BorderThickness="0"
Padding="0"
IsTabStop="False">
<ItemsPresenter
x:Name="Items"
Margin="10,0,10,10" />
</ScrollViewer>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
을하지만,이 스타일 전설 컨테이너와 제목 만.
어떻게 범례 항목의 스타일을 지정할 수 있습니까 ??
편집 : 감사 답변을 많이 필립, 이것은 내가 원하는 정확히입니다. 하지만 비주얼 스튜디오에서 나에게 오류를 준 :
<Setter.Value>
<ItemsPanelTemplate>
<controls:UniformGrid
Columns="1"
Rows="5" />
</ItemsPanelTemplate>
</Setter.Value>
그것은 컨트롤을했다 : UniformGrid를 찾을 수 없습니다, 나는이 부분을 제거하고 작업 일을 얻을 수 있었다.