Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Extension properties setters in initializers #301

Closed
baronfel opened this issue Oct 20, 2016 · 0 comments
Closed

Allow Extension properties setters in initializers #301

baronfel opened this issue Oct 20, 2016 · 0 comments

Comments

@baronfel
Copy link
Contributor

baronfel commented Oct 20, 2016

Allow Extension properties setters in initializers [6200089]

Submitted by Paul on 7/21/2014 12:00:00 AM
6 votes on UserVoice prior to migration

I suggest we consider allowing ExtensionProperty=expr property setters in initializers.
For example
C(ExtensionProperty = [1;2;3])
Or for example to provide c# “add” pattern like support
type StackLayout with
member x.ChildrenInitializer with set (values : UIElement seq)=
values |> Seq.iter x.Children.Add
let layout = StackLayout (Orientation = StackOrientation.Horizonta,
ChildrenInitializer = [Entry(Placeholder = “Username”);Entry()])

Response

** by fslang-admin on 1/21/2015 12:00:00 AM **

This has now been completed for F# 4.0+, see dotnet/fsharp#17 and https://github.com/fsharp/FSharpLangDesign/blob/master/FSharp-4.0/ExtensionPropertyInitializersDesignAndSpec.md

Original UserVoice Submission
Archived Uservoice Comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant