Skip to content

Instantly share code, notes, and snippets.

//Add using statements:
//using Xamarin.Forms;
//using Ooui.AspNetCore;
//Add these in Configure:
//app.UseOoui();
//Forms.Init();
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyFirstOouiApp.Pages.MyPage">
<ContentPage.Content>
<StackLayout>
<Label Text="Hello World" FontSize="Large"
HorizontalOptions="Center" HorizontalTextAlignment="Center"/>
<Button Text="Click Me!!!" Clicked="Handle_Clicked" HeightRequest="50"/>
</StackLayout>
{
"manifestVersion": 1,
"id": "ID-HERE",
"name": "NAME-HERE",
"version": "0.3.2",
"publisher": "PUBLISHER-HERE",
"public" : false,
"repository": {
"type": "git",
"uri": "https://github.com/jamesmontemagno/vsts-mobile-tasks"
├──images
└──extension-icon.png
├──tasks
├──Task1
└──icon.png
└──package.json
└──task.json
└──task.ts
└──tsconfig.json
├──Task2
public async Task<T> GetAsync<T>(string url, int days = 7, bool forceRefresh = false)
{
var json = string.Empty;
//check if we are connected, else check to see if we have valid data
if (!CrossConnectivity.Current.IsConnected)
json = Barrel.Current.Get(url);
else if (!forceRefresh && !Barrel.Current.IsExpired(url))
json = Barrel.Current.Get(url);
import hellosharedui.droid.UIHelpers;
try {
UIHelpers helpers = new UIHelpers();
Fragment frag = helpers.getMyPageFragment(MainActivity.this);
FragmentManager manager = getSupportFragmentManager();
manager.beginTransaction().replace(R.id.fragment, frag, "main").commit();
}
catch(Throwable ex) {
Log.d("MainActivity", "Unable to replace fragment");
#import "HelloSharedUI.iOS/HelloSharedUI.iOS.h"
- (IBAction)NavigateClicked:(id)sender {
HelloSharedUI_UIHelpers *helpers = [[HelloSharedUI_UIHelpers alloc] init];
[helpers showMyPage];
}
mono '${SolutionDir}/packages/Embeddinator-4000.0.3.0/tools/Embeddinator-4000.exe' '${TargetPath}' --gen=Java --platform=Android --outdir='${SolutionDir}/androidoutput' -c 'bin/Debug/FormsViewGroup.dll'
mono '${SolutionDir}/packages/Embeddinator-4000.0.3.0/tools/objcgen.exe' 'bin/Debug/HelloSharedUI.iOS.dll' --target=framework --platform=iOS --outdir='${SolutionDir}/iosoutput' -c --debug
[Register("hellosharedui.droid.UIHelpers")]
public class UIHelpers : Java.Lang.Object
{
public UIHelpers() : base()
{
}
public UIHelpers(IntPtr handle, JniHandleOwnership transfer)
: base(handle, transfer)
{