Skip to content

Instantly share code, notes, and snippets.

#include "stdafx.h"
#include "../WindowsProject/check.h"
using namespace System;
using namespace System::Text;
using namespace System::Collections::Generic;
using namespace Microsoft::VisualStudio::TestTools::UnitTesting;
namespace UnitTest1
#include "stdafx.h"
#include "check.h"
bool CheckE2(char ch, int numb)
{
if ((ch == 'e') && (numb == 2))
{
return true;
}
else
#include "CppUnitTest.h"
#include "../ConsoleApp/check.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace UnitTestNative
{
TEST_CLASS(UnitTest1)
{
private CALayer BottomLine;
...
private void TintCustomization(UITextField Control, MyEntry customEntry)
{
...
BottomLine = new CALayer
@Sa1Gur
Sa1Gur / MyEntryRenderer.cs
Last active June 15, 2019 15:48
for Android
using Android.Content;
using Android.Content.Res;
using Android.Graphics;
using Android.Graphics.Drawables;
using Android.OS;
using Android.Runtime;
using Android.Support.V4.Content;
using Android.Widget;
using EntryAccent;
using EntryAccent.iOS.Renderers;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ExportRenderer(typeof(Entry), typeof(MyEntryRenderer))]
namespace EntryAccent.iOS.Renderers
{
public class MyEntryRenderer: EntryRenderer
{
@Sa1Gur
Sa1Gur / myentrymain.xaml
Last active June 8, 2019 23:39
myentrymain.xaml
<StackLayout>
<Label Text="Default" />
<Entry Text="Text" TextColor="White" PlaceholderColor="Green" BackgroundColor="YellowGreen" />
<Entry Placeholder="Placeholder" TextColor="White" PlaceholderColor="Green" BackgroundColor="YellowGreen" />
</StackLayout>
using Xamarin.Forms;
namespace EntryAccent
{
public class MyEntry : Entry
{
}
}
#region Bindable Properties
public static readonly BindableProperty MyHighlightColorProperty = BindableProperty.Create(nameof(MyHighlightColor), typeof(Color), typeof(MyEntry));
public static readonly BindableProperty MyHandleColorProperty = BindableProperty.Create(nameof(MyHandleColor), typeof(Color), typeof(MyEntry));
public static readonly BindableProperty MyTintColorProperty = BindableProperty.Create(nameof(MyTintColor), typeof(Color), typeof(MyEntry));
#endregion
#region Properties
<...
xmlns:local="clr-namespace:EntryAccent"
x:Class="EntryAccent.MainPage"
>
...
<local:MyEntry Text="Text" TextColor="White" PlaceholderColor="Green" BackgroundColor="YellowGreen" MyHighlightColor="Blue" MyHandleColor="Violet" MyTintColor="Black" />
<local:MyEntry Placeholder="Placeholder" TextColor="White" PlaceholderColor="Green" BackgroundColor="YellowGreen" MyHighlightColor="Blue" MyHandleColor="Violet" MyTintColor="Black" />
...