[英]How to create a custom button for Windows Store app?
I want to make a custom button in shape of a picture with C#
for a Windows Store App
? 我想用
C#
为Windows Store App
一张图片形状的自定义按钮?
Is there a way to do that from xaml
? 有没有办法从
xaml
做到这一点? So far I've made a button and assigned a circle as a background image, but the problem is that even if I click outside the image the button works. 到目前为止,我已经制作了一个按钮,并将一个圆圈指定为背景图像,但问题是,即使我在图像外部单击按钮也能正常工作。
Also I do not believe that Image
class has an event
for click
unfortunately. 此外,我不相信
Image
类有一个不幸的click
event
。
With the help of google: Walkthrough: Create a Button by Using XAML 在谷歌的帮助下: 演练:使用XAML创建一个按钮
You should have a look into Expression Blend. 你应该看一下Expression Blend。 You can do all manualy in the XAML-Code but Blend is a huge help if you like to customize your project look and feel.
你可以在XAML-Code中完成所有工作,但如果你想定制你的项目外观,Blend是一个巨大的帮助。 Look at the MSDN-Examples .
看看MSDN-Examples 。
I just recently implemented the WinRT XAML toolkit and it works wonder for me. 我刚刚实施了WinRT XAML工具包,它对我来说很奇怪。 It has an imagebutton control that might do what you want to do.
它有一个imagebutton控件,可以做你想做的事情。 http://winrtxamltoolkit.codeplex.com/
http://winrtxamltoolkit.codeplex.com/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.