WPF Callout Anchor start position

2.8k views Asked by At

I have implement Callout control of Blend. Problem which I am facing is anchor point of the Callout starts with some margin from the top, While I want to have anchor from the top left of the callout. Any help will be appreciated.

What I have now:

enter image description here What I would like to have:

enter image description here

1

There are 1 answers

1
Sheridan On

You seem to be mistaken about using this control. From MSDN, the Callout.AnchorPoint property Gets or sets the position of the callout relative to the top and left corner. It is used for positioning the control and does not alter the shape of the Callout.


UPDATE >>>

Dude!!! That's a really simple shape... just draw your own one with a Path... then you can make it any shape you want:

enter image description here

<Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">
    <Path.Data>
        <CombinedGeometry GeometryCombineMode="Union">
            <CombinedGeometry.Geometry1>
                <RectangleGeometry RadiusX="20" RadiusY="20" Rect="0,0,300,200">
                    <RectangleGeometry.Transform>
                        <TranslateTransform X="30" />
                    </RectangleGeometry.Transform>
                </RectangleGeometry>
            </CombinedGeometry.Geometry1>
            <CombinedGeometry.Geometry2>
                <PathGeometry>
                    <PathFigure StartPoint="0,30">
                        <LineSegment Point="50,10" />
                        <LineSegment Point="50,50" />
                    </PathFigure>
                </PathGeometry>
            </CombinedGeometry.Geometry2>
        </CombinedGeometry>
    </Path.Data>
    <Path.Effect>
        <DropShadowEffect Color="Black" Opacity="0.4" Direction="-135"
            ShadowDepth="10" />
    </Path.Effect>
</Path>