Xamarin Forms documentation: Include default value for properties

AndrewMobileAndrewMobile USMember ✭✭✭✭
edited July 13 in Xamarin.Forms Evolution

Summary

The generated documentation at https://developer.xamarin.com/api/ should have default value for properties.

For example, I had to dig into the Xamarin Forms source code to find what is the default value of the Aspect property of the Image control.
The documentation for the property does not include it: https://developer.xamarin.com/api/type/Xamarin.Forms.Aspect/

Microsoft does it since like forever:
https://msdn.microsoft.com/en-us/library/system.windows.controls.image.stretch(v=vs.110).aspx

Property Value
Type: System.Windows.Media.Stretch
One of the Stretch values. The default is Uniform.

@MigueldeIcaza @NatFriedman.5738 @DavidOrtinau Can we please have this? Thank you.

API Changes

NONE

Intended Use Case

Help everyone write better code.

0
0 votes

Open · Last Updated

Posts

  • N_BauaN_Baua INMember ✭✭✭✭✭

    Hi @AndrewMobile,

    Really nice point here, There are other members, who also are pointing similar requirements, can you please pour your suggestions there as well. Thanks.

    Here is the thread: > https://forums.xamarin.com/discussion/comment/285755
    Hope this helps XF community to address something more out of Forums OR apart from forums.

    Regards,
    N Baua

  • AndrewMobileAndrewMobile USMember ✭✭✭✭
    edited July 13

    @N_Baua Just to be sure we're on the same page, examples are great and Xamarin has examples in the documentation already. Some of the documentation is very good.

    I was not referring to examples. I was referring to include the default value of properties in the API documentation https://developer.xamarin.com/api/ which is generated automatically based on the source code. Exactly how Microsoft does it in the link I posted in my previous message.

    Let's not mix it up, I was referring to a very precise thing.

    Thanks!

  • N_BauaN_Baua INMember ✭✭✭✭✭

    @AndrewMobile ,

    Yeah I can understand that,
    I am not mixing the two concepts, The question here is Does in all scenarios the auto-generated API is sufficient?

    Also that I agree to the statement 'Exactly how Microsoft does it', and that's the whole point, when Xamarin is now in Microsoft bucket why not for Xamarin?

    If you see there are numerous blogs and sites which you will find for other technologies, (say for example : C# - CSharpCorner.com. ) My motive is to start a user-driven portal/blog which focuses on the Xamarin Forms, and that's the reason, I am asking views of the like-minded forum users. Now it is up to you, how you wish to suggest something.

    Thanks anyways.

    Regards,
    N Baua

  • ChaseFlorellChaseFlorell CAInsider, University mod

    Since the +1 still isn't implemented in this forum, I'd like to add my vote to this as well. There are many situations where I'd like to see the default value. I'd like to see it in the Intellisense comments.

    OLD

    /// <summary>
    /// Gets or sets the [blank] for the [blank]. This is a bindable property.
    /// </summary>
    

    NEW

    /// <summary>
    /// Gets or sets the [blank] for the [blank]. This is a bindable property. The default is [blank]
    /// </summary>
    
  • Rafael.SantosRafael.Santos PTUniversity ✭✭

    Agree 100%

  • VelocityVelocity NZMember ✭✭✭

    +1 This would certainly be valuable.

Sign In or Register to comment.