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
import SwiftUI | |
struct ContentView1: View { | |
@State var cond = false | |
var body: some View { | |
ZStack { | |
Color.blue.opacity(cond ? 0.2 : 0.7) | |
Test(cond: cond) | |
} | |
.onTapGesture { |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using System.Threading.Tasks.Dataflow; | |
using ICountingTransform = Messaging.ITransform<Messaging.CountingMessage, Messaging.CountingState>; | |
using ICountingSideEffect = Messaging.ISideEffect<Messaging.CountingView, Messaging.CountingMessage, Messaging.CountingState>; | |
namespace Messaging |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
namespace Messaging | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
using System; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace EventActionFunc | |
{ | |
public class Program | |
{ | |
static async Task Main(string[] args) | |
{ |
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
using System; | |
using System.Threading.Tasks; | |
using System.Threading.Tasks.Dataflow; | |
using Nito.AsyncEx; | |
namespace Core.Utility | |
{ | |
public abstract class BaseOperation<TInput, TOutput> | |
{ | |
public TaskCompletionSource<TOutput> TaskCompletionSource { get; } |
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
using System; | |
using System.Drawing; | |
// adapted from https://stackoverflow.com/a/37980328 | |
namespace FrameworkInterface | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) |
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
// from https://forums.xamarin.com/discussion/comment/168974/#Comment_168974 | |
public class BindableToolbarItem : ToolbarItem | |
{ | |
public static readonly BindableProperty IsVisibleProperty = | |
BindableProperty.Create("IsVisible", typeof (bool), typeof (BindableToolbarItem), | |
true, BindingMode.TwoWay, propertyChanged: OnIsVisibleChanged); | |
public BindableToolbarItem() | |
{ |
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
// from https://forums.xamarin.com/discussion/100540/set-default-culture-to-culture-of-device | |
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(CultureInfo.CurrentUICulture.ToString()); | |
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
// from https://forums.xamarin.com/discussion/comment/279890/#Comment_279890 | |
public partial class GradientView : ContentView | |
{ | |
public Color StartColor { get; set; } = Color.Transparent; | |
public Color EndColor { get; set; } = Color.Transparent; | |
public bool Horizontal { get; set; } = false; | |
public GradientView() | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Threading.Tasks.Dataflow; | |
namespace MyNamespace |
NewerOlder