Entradas

Mostrando entradas de febrero, 2016

Xamarin.Forms Picker

Imagen
In this post, we gonna be see, the Picker Control in Xamarin.Forms The picker is a control that allows select one element from a predetermined list of options. The first thing that we need to do, is create a instance of Picker:             Xamarin . Forms . Picker   picker   =   new  Xamarin . Forms . Picker              {                 Title  =   " Chose   one   country " ,                 VerticalOptions  =   LayoutOptions . CenterAndExpand ,                 BackgroundColor = Color . Aqua              } ; Next, we need to asign the values for our Picker control, and we do it, on the next way:             picker . Items . Add   ( " Canada " ) ;              picker . Items . Add   ( " USA " ) ;              picker . Items . Add   ( " Mexico " ) ;              picker . Items . Add   ( " Brasil " ) ;              picker . Items . Add   ( " Argentina " ) ;              picker . Items . Add   ( &q

Xamarin.Forms Frame

Imagen
Hello, in this post we gonna be look how we can use a Frame in Xamarin.Forms This simple rectangular view sometimes is very usefull for presentation purposes. The first, we add a new Page, called FramePage. in the constructor we add a new View, the Frame View, also we declare some properties, like OutlineColor, and if we want that has Shadow around of the frame:              this . Content   =   new  Xamarin . Forms . Frame   {              // It   has   a   few  properties                 OutlineColor = Color . Blue ,                 HasShadow = true , } So, to avoid that the frame fill all the page, we add the properties to center the frame inside of the page:                 HorizontalOptions = LayoutOptions . CenterAndExpand ,                 VerticalOptions = LayoutOptions . CenterAndExpand , And for last, we add the content of the frame, in this case we add a single Label, Content =   new   Label {                     Text = " This   is