You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()])
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
The text was updated successfully, but these errors were encountered: