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 System.Runtime.CompilerServices; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Xaml; | |
namespace SalesHub.Framework.Localization | |
{ | |
[ContentProperty("Text")] | |
public class LocalizerTranslateExtension : BindableObject, IMarkupExtension<BindingBase> | |
{ |
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
[ContentProperty("Text")] | |
public class TranslateExtension : IMarkupExtension<bindingbase> | |
{ | |
public string Text { get; set; } | |
object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider, ILocalizer localizer) | |
{ | |
return ProvideValue(serviceProvider, localizer); | |
} | |
public BindingBase ProvideValue(IServiceProvider serviceProvider, ILocalizer localizer) |
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"?> | |
<view:BaseProductEntryCardView xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="SalesHub.Framework.Components.Products.ProductEntryTruckLoadForecastCardView" | |
xmlns:view="clr-namespace:SalesHub.Framework.Components.Products" | |
VerticalOptions="Start" | |
xmlns:forms="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"> | |
<ContentView.ControlTemplate> | |
<ControlTemplate x:Key="Page"> |
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" ?> | |
<local:BaseQuickTourPage | |
xmlns:local="clr-namespace:QuickTourXFSample.Views.QuickTourSteps" | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:Controls="clr-namespace:QuickTourXFSample.Controls" | |
x:Class="QuickTourXFSample.Views.QuickTourSteps.QuickTourStep3PopUp" > | |
<StackLayout Padding="10,130,10,0"> | |
<Controls:AnimatedView> | |
<Frame HorizontalOptions="FillAndExpand" |
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" ?> | |
<local:BaseQuickTourPage | |
xmlns:local="clr-namespace:QuickTourXFSample.Views.QuickTourSteps" | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:Controls="clr-namespace:QuickTourXFSample.Controls" | |
x:Class="QuickTourXFSample.Views.QuickTourSteps.QuickTourStep2PopUp" > | |
<StackLayout> | |
<Controls:AnimatedView> | |
<Button Text="Add" |
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 HomePage : FlyoutPage | |
{ | |
public ICommand ShowQuickTourCommand { get; } | |
public HomePage() | |
{ | |
InitializeComponent(); | |
var quickTourLauncher = QuickTourBuilder<QuickTourStep1PopUp> | |
.Initialize() |
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 QuickTourStep1PopUp : BaseQuickTourPage, IQuickTourLauncher | |
{ | |
public QuickTourStep1PopUp(): base() => InitializeComponent(); | |
public Task LaunchAsync() => PopupNavigation.Instance.PushAsync(this, false); | |
} |
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" ?> | |
<local:BaseQuickTourPage | |
xmlns:local="clr-namespace:QuickTourXFSample.Views.QuickTourSteps" | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:Controls="clr-namespace:QuickTourXFSample.Controls" | |
x:Class="QuickTourXFSample.Views.QuickTourSteps.QuickTourStep1PopUp" > | |
<Controls:AnimatedView VerticalOptions="CenterAndExpand"> | |
<Frame Padding="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
public class QuickTourBuilder<T> | |
where T : BaseQuickTourPage, IQuickTourLauncher, new() | |
{ | |
public static QuickTourBuilder<T> Initialize() | |
=> new QuickTourBuilder<T>(new T()); | |
public QuickTourBuilder<T> Next(BaseQuickTourPage page) | |
{ | |
_pages.Last().NextPage = page; |
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 interface IQuickTourLauncher | |
{ | |
Task LaunchAsync(); | |
} |
NewerOlder