This file contains 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
name: Format check on pull request | |
on: pull_request | |
jobs: | |
dotnet-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2.2.0 | |
with: | |
fetch-depth: 0 |
This file contains 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
using System; | |
using CollectionViewBounceSample.iOS; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
[assembly: ExportRenderer(typeof(CollectionView), typeof(NoBounceRenderer))] | |
namespace CollectionViewBounceSample.iOS | |
{ | |
public class NoBounceRenderer : CollectionViewRenderer | |
{ |
This file contains 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
var azureDevOpsUrl = "https://dev.azure.com/jfversluis"; | |
var resultUrl = ""; | |
var azureDevOpsMatch = Regex.Match(azureDevOpsUrl, "(?<protocol>http[s]?://)(?<domainandpath>dev.azure.com/(?<accountname>[a-zA-Z]*)(.*))", RegexOptions.IgnoreCase); | |
if (azureDevOpsMatch.Success) | |
{ | |
resultUrl = $"{azureDevOpsMatch.Groups["protocol"]}{azureDevOpsMatch.Groups["accountname"]}@{azureDevOpsMatch.Groups["domainandpath"]}"; | |
} | |
Console.WriteLine(resultUrl); |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="CastRadio.MainPage" xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" ios:Page.UseSafeArea="true"> | |
<StackLayout> | |
<Entry Text="{Binding CastUrl, Mode=TwoWay}" /> | |
<Button Text="Cast" Command="{Binding StartCastCommand}" /> | |
<ListView MinimumHeightRequest="100" SelectionMode="Single" ItemsSource="{Binding CastDevices}" SelectedItem="{Binding SelectedCastDevice}"> | |
<ListView.ItemTemplate> | |
<DataTemplate> | |
<TextCell Text="{Binding FriendlyName}" /> | |
</DataTemplate> |
This file contains 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 MainPage : ContentPage | |
{ | |
public string CastUrl { get; set; } = "https://icecast-qmusicnl-cdp.triple-it.nl/Qmusic_nl_live_32.aac"; | |
public ObservableCollection<IReceiver> CastDevices { get; set; } | |
public IReceiver SelectedCastDevice { get; set; } | |
public Command StartCastCommand { get; set; } | |
public MainPage() |
This file contains 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 ColumnDefinitions="1*, 2*, Auto, *, 300" RowDefinitions="1*, Auto, 25, 14, 20"/> |
This file contains 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> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="1*" /> | |
<ColumnDefinition Width="2*" /> | |
<ColumnDefinition Width="Auto" /> | |
<ColumnDefinition Width="*" /> | |
<ColumnDefinition Width="300" /> | |
</Grid.ColumnDefinitions> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="1*" /> |
This file contains 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
using System.Collections.ObjectModel; | |
using Xamarin.Forms; | |
namespace DataBindingScopeSample | |
{ | |
public class ListModel | |
{ | |
public string Title { get; set; } | |
public string Image { get; set; } | |
} |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="DataBindingScopeSample.MainPage" xmlns:local="clr-namespace:DataBindingScopeSample;assembly=DataBindingScopeSample" Title="Nine-Nine"> | |
<!-- Scope is MainPageViewModel, therefore we can set the ItemsSource to its MyItems property --> | |
<ListView x:Name="ListOfPeople" ItemsSource="{Binding MyItems}" RowHeight="100"> | |
<ListView.ItemTemplate> | |
<DataTemplate> | |
<!-- Here the scope is the ListModel object. That is why we can reference the Title and Image properties --> | |
<ImageCell Text="{Binding Title}" ImageSource="{Binding Image}"> | |
<!-- WARNING: NOT WORKING! --> | |
<!-- You would expect the binding to HighFiveCommand to just |
This file contains 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
// For iOS in the AppDelegate.cs | |
public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions) | |
{ | |
global::Xamarin.Forms.Forms.SetFlags("SwipeView_Experimental", "CarouselView_Experimental"); | |
Forms.Init(); | |
// The rest of the code... | |
} | |
// For Android in the MainActivity.cs |