I would like to adjust the default controltemplate of a Button. In WPF i would just use blend to see the default controltemplate but for Xamarin.Forms i can not use blend.
Also in the App.xaml file i see a reference to
<ResourceDictionary Source="Resource Dictionaries/StandardStyles.xaml"/>
but i do not find the StandardStyles.xaml file so i am out of luck there as well.
And on the Xamarin site i do not find the default controltemplates neither. So where/how can i find the default controltemplates for the Xamarin.Forms controls?
At this point,
Xamarin.Forms
doesn't provide templating support for buttons - so there is no default template(s) to refer (as we do in WPF) orControlTemplate
property inButton
. It simply renders the platform version of button in target platform.Control templates usually are supported by controls that have a
Content
property. A good example would beContentView
. You can write a custom button control while extending aContentView
, while providing templating support, and useContentPresenter
to render the associated button.EDIT 1 - Custom button control with templated support
For example:
Sample usage: