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 Xamarin.Forms.Xaml; | |
... | |
[XamlCompilation (XamlCompilationOptions.Compile)] | |
public class HomePage : ContentPage | |
{ | |
... | |
} |
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 Xamarin.Forms; | |
namespace GradientColorDemo.CustomControls { | |
public class GradientColorStack: StackLayout { | |
public Color StartColor { | |
get; | |
set; | |
} | |
public Color EndColor { | |
get; | |
set; |
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
<?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:local="clr-namespace:GradientColorDemo.CustomControls; assembly:GradientColorDemo" | |
x:Class="GradientColorDemo.Views.GradientColorPage"> | |
<Grid VerticalOptions="FillAndExpand" RowSpacing="0"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*" /> | |
<RowDefinition Height="*" /> </Grid.RowDefinitions> | |
<Grid Grid.Row="0" BackgroundColor="#3e5151"> |
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 GradientColorDemo.Droid; | |
using GradientColorDemo.CustomControls; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.Android; | |
[assembly: ExportRenderer(typeof(GradientColorStack), typeof(GradientColorStackRenderer))] | |
namespaceDroid { | |
public class GradientColorStackRenderer: VisualElementRenderer < StackLayout > { | |
private Color StartColor { | |
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 CoreAnimation; | |
using CoreGraphics; | |
using GadientColorDemo.CustomControls; | |
using GadientColorDemo.iOS; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
[assembly: ExportRenderer(typeof(GradientColorStack), typeof(GradientColorStackRenderer))] | |
namespace GadientColorDemo.iOS { | |
public class GradientColorStackRenderer: VisualElementRenderer <StackLayout> { | |
public override void Draw(CGRect rect) { |
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
namespace XamarinFloatingTabs.iOS.Renderers | |
{ | |
public class CustomTabbedPageRenderer : TabbedRenderer | |
{ | |
private UIView _overlayTabView; | |
protected override void OnElementChanged(VisualElementChangedEventArgs e) | |
{ | |
base.OnElementChanged(e); | |
Element.PropertyChanged += OnElementPropertyChanged; |
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
private void OnDiscoveryClicked(object sender, System.EventArgs e) | |
{ | |
if (App.Current.MainPage is TabbedPage mainPage && sender is Button button) | |
{ | |
mainPage.CurrentPage = mainPage.Children[0]; | |
Tab1.TextColor = Color.Gray; | |
Tab2.TextColor = Tab3.TextColor = Color.DarkGray; | |
} | |
} |
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 IconView : View | |
{ | |
#region ForegroundProperty | |
public static readonly BindableProperty ForegroundProperty = BindableProperty.Create(nameof(Foreground), typeof(Color), typeof(IconView), default(Color)); | |
public Color Foreground { | |
get { | |
return (Color)GetValue (ForegroundProperty); | |
} |
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
[assembly: ExportRendererAttribute(typeof(IconView), typeof(IconViewRenderer))] | |
namespace IconApp.Droid.Renderers | |
{ | |
public class IconViewRenderer : ViewRenderer<IconView, ImageView> | |
{ | |
private bool _isDisposed; | |
public IconViewRenderer() | |
{ |
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
[assembly: ExportRendererAttribute(typeof(IconView), typeof(IconViewRenderer))] | |
namespace IconApp.iOS.Renderers | |
{ | |
public class IconViewRenderer : ViewRenderer<IconView, UIImageView> | |
{ | |
private bool _isDisposed; | |
protected override void Dispose(bool disposing) | |
{ |