Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The translation for the XML in my first example content page.
' Passing `Nothing` as the first arg of Set<AttributeName> methods indicates
' that the compiler couldn't convert the attribute text to the indicated type
' at compile time. If I had written `FontSize="16"`, that line would read:
' `temp1_1_1.SetFontSize(16.0, "16.0", Nothing)`
' The third argument is the value produced by an embedded expression, if it
' doesn't naturally convert to the first arg type at compile time. If I had
' written `Text=<%= New Binding("Name") %>`, that line would read:
' `temp1_1_2.SetText(Nothing, Nothing, New Binding("Name"))`
Dim temp1 = New ContentPage
temp1.Title = "My First Android App!"
temp1.BindingContext = Model
Dim temp1_1 = New StackLayout
temp1_1.SetVerticalOptions(Nothing, "Center", Nothing)
Dim temp1_1_1 = New Label
temp1_1_1.HorizontalTextAlignment = TextAlignment.Center
temp1_1_1.SetFontSize(Nothing, "Medium", Nothing)
temp1_1_1.Text = "Welcome to Xamarin.Forms with Visual Basic .NET!"
temp1_1.AddChildContent(temp1_1_1)
Dim temp1_1_2 = New Entry
temp1_1_2.SetText(Nothing, "{Binding Name}", Nothing)
temp1_1.AddChildContent(temp1_1_2)
Dim temp1_1_3 = New Button
temp1_1_3.Text = "Next"
AddHandler temp1_1_3.Clicked, AddressOf NextButton_Click
temp1_1.AddChildContent(temp1_1_3)
temp1.SetChildContent(temp1_1)
Dim page = temp1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.