开发者

How can i create ToggleButton with image and text?

开发者 https://www.devze.com 2023-02-21 08:20 出处:网络
I want to create ToggleButton that contain image on the center and text on the button. I try to do it by define new usercontrol - 开发者_如何学Gobut its not good way.

I want to create ToggleButton that contain image on the center and text on the button.

I try to do it by define new usercontrol - 开发者_如何学Gobut its not good way.

How can i do it on silverlight ?


Try the following:

<ToggleButton>
  <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
    <Image Source="..."/>
    <TextBlock Text="Click me"/>
  </StackPanel>
</ToggleButton>
0

精彩评论

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