This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ItemsSourceChanged () | |
{ | |
if (ItemsSource == null) return; | |
CreateTabs(); | |
} | |
void CreateTabs() | |
{ | |
if(Children != null && Children.Count > 0) Children.Clear(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public HomePage(CarouselLayout.IndicatorStyleEnum indicatorStyle) | |
{ | |
_indicatorStyle = indicatorStyle; | |
viewModel = new SwitcherPageViewModel(); | |
BindingContext = viewModel; | |
Title = _indicatorStyle.ToString(); | |
relativeLayout = new RelativeLayout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App : Application | |
{ | |
public IEnumerable<ICarouselViewModel> _pages; | |
public App() | |
{ | |
_pages = new List<ICarouselViewModel>() | |
{ | |
new PageOneViewModel(), | |
new PageTwoViewModel() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
async Task UpdateSelectedItem () | |
{ | |
await Task.Delay(300); | |
SelectedItem = SelectedIndex > -1 ? Children[SelectedIndex].BindingContext : null; | |
} | |
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity | |
{ | |
protected override void OnCreate(Bundle bundle) | |
{ | |
base.OnCreate(bundle); | |
global::Xamarin.Forms.Forms.Init(this, bundle); | |
Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); | |
LoadApplication(new App()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Constants | |
{ | |
// Replace strings with your mobile services and gateway URLs. | |
public static string ApplicationURL = @"https://your-app-name.azurewebsites.net"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TodoItem : EntityData | |
{ | |
string id; | |
string name; | |
bool done; | |
[JsonProperty(PropertyName = "id")] | |
public string Id | |
{ | |
get { return id; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid RowSpacing="0"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> | |
<ActivityIndicator Grid.RowSpan="2" | |
HorizontalOptions="Center" | |
VerticalOptions="Center" | |
IsVisible="False" | |
IsEnabled="True" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class TodoList : ContentPage | |
{ | |
IEasyMobileServiceClient _client; | |
public TodoList(IEasyMobileServiceClient client) | |
{ | |
InitializeComponent(); | |
_client = client; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class App : Application | |
{ | |
public App() | |
{ | |
InitializeComponent(); | |
// 1. Create a new EasyMobileServiceClient. | |
var client = EasyMobileServiceClient.Create(); | |
// 2. Initialize the library with the URL of the Azure Mobile App you created in Step #1. |