Please note: this question is not the same as this question.
I recently came across some C# syntax I hadn\'t previously encountered:
Is there any wa
Would it make sense to encapsulate the construction into a separate initializer function?
let layerInit layer radius color offset opacity =
do
layer.ShadowRadius <- radius
layer.ShadowColor <- color
layer.ShadowOffset <- offset
layer.ShadowOpacity <- opacity
layer // I do this in case you want to use this fluently or pass in new Layer()
Then use that in your code:
let nameLabel = new UILabel ( TextColor = UIColor.White )
layerInit nameLabel.Layer 3.0f UIColor.Black.CGColor new System.Drawing.SizeF(0.0f,1.0f) 0.5f |> ignore