Visual Studio Technologies & Windows Platform Development MVP Xamarin MVP Software Developer Plain Concepts • Blog: http://geeks.ms/blogs/jsuarez • Email: javiersuarezruiz@hotmail.com • Twitter: @jsuarezruiz
Enfoque tradicional de Xamarin Con Xamarin.Forms: Más código compartido, todo nativo iOS C# UI Windows C# UIAndroid C# UI Shared C# Backend Shared UI Code Shared C# Backend
✓ 40+ páginas, layouts, y controles (code behind o XAML) ✓ Two-way data binding ✓ Mavegación ✓ API de animaciones ✓ Dependency Service ✓ Messaging Center Shared C# Backend Shared UI Code
Layouts Páginas Stack Absolute Relative Grid ContentView ScrollView Frame Content MasterDetail Navigation Tabbed Carousel
ActivityIndicator BoxView Button DatePicker Editor Entry Image Label ListView Map OpenGLView Picker ProgressBar SearchBar Slider Stepper TableView TimePicker WebView EntryCell ImageCell SwitchCell TextCell ViewCell
El ecosistema Xamarin.Forms
Windows Xamarin.Forms StackPanel StackLayout TextBox Entry ListBox ListView CheckBox Switch ProgressBar ActivityIndicator Grid Grid Label Label Button Button Image Image Date/TimePicker Date/TimePicker
Windows Xamarin.Forms DataContext BindingContext {Binding Property} {Binding Property} ItemsSource ItemsSource ItemTemplate ItemTemplate DataTemplate DataTemplate
<?xml version="1.0" encoding="UTF-8"?> <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MyApp.MainPage"> <TabbedPage.Children> <ContentPage Title="Profile" Icon="Profile.png"> <StackLayout Spacing="20" Padding="20" VerticalOptions="Center"> <Entry Placeholder="Username" Text="{Binding Username}"/> <Entry Placeholder="Password" Text="{Binding Password}" IsPassword="true"/> <Button Text="Login" TextColor="White" BackgroundColor="#77D065" Command="{Binding LoginCommand}"/> </StackLayout> </ContentPage> <ContentPage Title="Settings" Icon="Settings.png"> <!-- Settings --> </ContentPage> </TabbedPage.Children> </TabbedPage>
Xamarin.Forms es Open Source! open.xamarin.com
10 Minutos de descanso Javier Suárez Ruiz javiersuarezruiz@hotmail.com https://javiersuarezruiz.wordpress.com @jsuarezruiz

Xamarin Dev Days - Xamarin.Forms

  • 2.
    Visual Studio Technologies& Windows Platform Development MVP Xamarin MVP Software Developer Plain Concepts • Blog: http://geeks.ms/blogs/jsuarez • Email: javiersuarezruiz@hotmail.com • Twitter: @jsuarezruiz
  • 5.
    Enfoque tradicional de Xamarin ConXamarin.Forms: Más código compartido, todo nativo iOS C# UI Windows C# UIAndroid C# UI Shared C# Backend Shared UI Code Shared C# Backend
  • 6.
    ✓ 40+ páginas,layouts, y controles (code behind o XAML) ✓ Two-way data binding ✓ Mavegación ✓ API de animaciones ✓ Dependency Service ✓ Messaging Center Shared C# Backend Shared UI Code
  • 7.
    Layouts Páginas Stack Absolute RelativeGrid ContentView ScrollView Frame Content MasterDetail Navigation Tabbed Carousel
  • 8.
    ActivityIndicator BoxView ButtonDatePicker Editor Entry Image Label ListView Map OpenGLView Picker ProgressBar SearchBar Slider Stepper TableView TimePicker WebView EntryCell ImageCell SwitchCell TextCell ViewCell
  • 9.
  • 10.
    Windows Xamarin.Forms StackPanel StackLayout TextBoxEntry ListBox ListView CheckBox Switch ProgressBar ActivityIndicator Grid Grid Label Label Button Button Image Image Date/TimePicker Date/TimePicker
  • 11.
    Windows Xamarin.Forms DataContext BindingContext {BindingProperty} {Binding Property} ItemsSource ItemsSource ItemTemplate ItemTemplate DataTemplate DataTemplate
  • 13.
    <?xml version="1.0" encoding="UTF-8"?> <TabbedPagexmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="MyApp.MainPage"> <TabbedPage.Children> <ContentPage Title="Profile" Icon="Profile.png"> <StackLayout Spacing="20" Padding="20" VerticalOptions="Center"> <Entry Placeholder="Username" Text="{Binding Username}"/> <Entry Placeholder="Password" Text="{Binding Password}" IsPassword="true"/> <Button Text="Login" TextColor="White" BackgroundColor="#77D065" Command="{Binding LoginCommand}"/> </StackLayout> </ContentPage> <ContentPage Title="Settings" Icon="Settings.png"> <!-- Settings --> </ContentPage> </TabbedPage.Children> </TabbedPage>
  • 16.
  • 26.
    10 Minutos dedescanso Javier Suárez Ruiz javiersuarezruiz@hotmail.com https://javiersuarezruiz.wordpress.com @jsuarezruiz

Editor's Notes

  • #8 Inside of a page are layouts A lot of options from something simple like a stack panel to complex and powerful grids