This is a migrated thread and some comments may be shown as answers.

Point Marker Size Width Height

1 Answer 58 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 24 Sep 2011, 01:48 AM
Just in case someone else needs to set size width and height on point marker.  Here's the template.  Found it in documentation but was not here.

<UserControl.Resources>
        <Style x:Key="MyPointMark_Style" TargetType="t:PointMark">
            <Setter Property="Size" Value="20" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="t:PointMark">
                        <Canvas>
                            <Path x:Name="PART_PointMarkPath"
                                 Canvas.Left="{TemplateBinding PointMarkCanvasLeft}"
                                 Canvas.Top="{TemplateBinding PointMarkCanvasTop}"
                                 Width="{TemplateBinding Size}"
                                 Height="{TemplateBinding Size}"
                                 Style="{TemplateBinding ShapeStyle}"
                                 Fill="{Binding DataItem.Y2S, Converter={StaticResource LocalStatusColorConverter}}"
                                 Stroke="{Binding DataItem.Y2S, Converter={StaticResource LocalStatusColorConverter}}"
                                 Stretch="Fill">
                                <Path.Data>
                                    <PathGeometry x:Name="PART_PointMarkPathGeometry" />
                                </Path.Data>
                            </Path>
                        </Canvas>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 28 Sep 2011, 08:22 AM
Hello Dennis,

There is no need of retemplating the PointMark Style just to change the pointmarks size. You can use the Size property like this for example:

LineSeriesDefinition l = new LineSeriesDefinition();
l.Appearance.PointMark.Stroke = new SolidColorBrush( Colors.Blue );
l.Appearance.PointMark.StrokeThickness = 1;
l.Appearance.PointMark.Size = 12;


Best wishes,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Dennis
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or