Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Xamarin PT2
Xamarin PT2
1.
namespace helloForms
{
public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new helloFormsPage();
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}
namespace helloForms.Droid
{
[Activity(Label = "helloForms.Droid", Icon = "@drawable/icon", Theme =
"@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize
| ConfigChanges.Orientation)]
public class MainActivity :
global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
}
}
}
namespace helloForms.iOS
{
[Register("AppDelegate")]
public partial class AppDelegate :
global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
}
2.
XAML
<Line X1="40"
Y1="0"
X2="0"
Y2="120"
Stroke="DarkBlue"
StrokeDashArray="1,1"
StrokeDashOffset="6" />