简体   繁体   English

如何为Windows应用商店应用创建自定义按钮?

[英]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.

相关问题 如何在Windows Store App中创建绑定 - How to create Binding in Windows Store App 如何为Windows Store App创建报告? - How to create report for Windows Store App? 如何将自定义类存储到Windows应用商店应用中的LocalSettings? - How to store custom class to LocalSettings in Windows Store App? 如何在Windows资源管理器工具栏中创建自定义按钮 - How to create a custom button in Windows Explorer toolbar Windows应用商店自定义控件 - Windows Store App Custom Control 如何在Windows应用商店应用中为按钮位置(边距)设置动画? - How to animate Button position (Margin) in Windows Store app? 如何相对于按钮在Windows应用商店应用中定位弹出控件? - How to position a popup control in a Windows Store App relative to a button? 如何在Windows Store App的MainPage之前添加自定义用户控件 - How to add custom user controls before the MainPage in Windows Store App IBM Worklight 6.1-如何为Windows 8 Store应用程序创建插件? - IBM Worklight 6.1 - How to create a plug-in for a Windows 8 Store app? 如何在位于特定文件夹的Windows应用商店中创建sqlite数据库 - how to create sqlite database in windows store app located at a specific folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM