Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using CoreGraphics;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(MyTextCell), typeof(AccessorizedTextCellRenderer))]
public class DocumentViewer : IDocumentViewer
{
public void ShowDocumentFile(string filepath, string mimeType)
{
var uri = global::Android.Net.Uri.Parse("file://" + filepath);
var intent = new Intent(Intent.ActionView);
intent.SetDataAndType(uri, mimeType);
intent.SetFlags(ActivityFlags.ClearWhenTaskReset | ActivityFlags.NewTask);
Forms.Context.StartActivity(intent);
}
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class PickerListCell
{
public PickerListCell()
{
InitializeComponent();
MyPicker.Unfocused += MyPicker_Unfocused;
}
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:InstitutionConnect;assembly=InstitutionConnect"
xmlns:converters="clr-namespace:InstitutionConnect.Converters"
xmlns:oxy="clr-namespace:OxyPlot.Xamarin.Forms;assembly=OxyPlot.Xamarin.Forms"
x:Class="InstitutionConnect.Layouts.PaymentDashboardPage">
<ContentPage.Resources>
<ResourceDictionary>
public class RepeaterView : StackLayout
{
public static readonly BindableProperty ItemTemplateProperty =
BindableProperty.Create("ItemTemplate", typeof(DataTemplate), typeof(RepeaterView));
public static readonly BindableProperty ItemsSourceProperty =
BindableProperty.Create("ItemsSource", typeof(IEnumerable), typeof(RepeaterView), Enumerable.Empty<object>(), BindingMode.OneWay, null, ItemsChanged);
public IEnumerable ItemsSource
{
public class RelayCommand : ICommand
{
#region Fields
readonly Action<object> _execute;
readonly Predicate<object> _canExecute;
#endregion // Fields
#region Constructors
public class CommandViewCell : ViewCell
{
/// <summary>
/// The bindable property implementation
/// </summary>
public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create("CommandParameter", typeof(object), typeof(CommandViewCell));
/// <summary>
/// The command parameter
/// </summary>
public object CommandParameter
public class VisualElementLostFocusBehavior : Behavior<VisualElement>
{
public static readonly BindableProperty CommandProperty =
BindableProperty.Create("Command", typeof(ICommand), typeof(VisualElementLostFocusBehavior));
public ICommand Command
{
get { return (ICommand)GetValue(CommandProperty); }
set { SetValue(CommandProperty, value); }
}
Incident Identifier: 38AEA52F-9143-4FFC-BD07-C574ABDF6A2A
CrashReporter Key: 9f9d82f8d83bb4d23de7ac29c815644b94c4c968
Hardware Model: iPhone9,3
Process: AccountMateMobileiOS [15832]
Path: /private/var/containers/Bundle/Application/98A919C8-B0A5-4EFB-B4DE-69A931B15D62/AccountMateMobileiOS.app/AccountMateMobileiOS
Identifier: com.accountmate.ios
Version: 36 (0.1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Incident Identifier: 38AEA52F-9143-4FFC-BD07-C574ABDF6A2A
CrashReporter Key: 9f9d82f8d83bb4d23de7ac29c815644b94c4c968
Hardware Model: iPhone9,3
Process: AccountMateMobileiOS [15832]
Path: /private/var/containers/Bundle/Application/98A919C8-B0A5-4EFB-B4DE-69A931B15D62/AccountMateMobileiOS.app/AccountMateMobileiOS
Identifier: com.accountmate.ios
Version: 36 (0.1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]