Reputation: 68800
I have a custom control with AbsoluteLayout attached properties:
<common:FabImage
AbsoluteLayout.LayoutFlags="PositionProportional"
AbsoluteLayout.LayoutBounds="1.0,1.0,-1,-1">
</common:FabImage>
How can I set these properties in C# in the code so I can default them?
Upvotes: 1
Views: 291
Reputation: 3251
I'm assuming you want to set this in your FabImage
cs code, which can be done like so:
AbsoluteLayout.SetLayoutBounds(this, new Rectangle(1.0, 1.0, -1, -1));
AbsoluteLayout.SetLayoutFlags(this, AbsoluteLayoutFlags.PositionProportional);
Upvotes: 3