开发者

WPF : Custom Controls

WPF : Custom Controls

My Question :

How to build custom layout for controls like above pictures ?

by Microsoft Expression Blend ? How ?

Please Direct me to the right ar开发者_运维技巧ticle or discuss what you have


Expression Blend 4 has some built-in shapes that could help you out here. Basically, you want to re-template a TextBox control to contain the speech bubble shape instead of a standard Border.

Alternatively, you could do this without re-templating. Something like this:

<UserControl xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" Margin="100">
    <ed:Callout AnchorPoint="-0.13,0.29" CalloutStyle="RoundedRectangle" Fill="#FFF4F4F5" Stroke="Black">
        <ed:Callout.Content>
            <TextBox BorderThickness="0" Background="Transparent">Hello</TextBox>
        </ed:Callout.Content>
    </ed:Callout>
</UserControl>

WPF : Custom Controls

By the way, did you really mean TextBox, or do you actually mean TextBlock? If the latter, all you need is:

<ed:Callout AnchorPoint="-0.13,0.29" CalloutStyle="RoundedRectangle" Fill="#FFF4F4F5" Stroke="Black" Content="Hello"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜