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 static readonly BindableProperty $property$Property = BindableProperty.Create( | |
nameof($property$), | |
typeof($type$), | |
typeof($classname$)); | |
public $type$ $property$ | |
{ | |
get => ($type$)GetValue($property$Property); | |
set => SetValue($property$Property, value); | |
} |
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
<ContentPage x:Class="DIPS.Xamarin.UI.Samples.Controls.Sheet.SheetPage" | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:dxui="http://dips.xamarin.ui.com" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d"> | |
<dxui:ModalityLayout> | |
<dxui:ModalityLayout.Behaviors> | |
<dxui:SheetBehavior Title="Awesome Sheet" |
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
<ContentPage x:Class="DIPS.Xamarin.UI.Samples.Controls.Sheet.SheetPage" | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:dxui="http://dips.xamarin.ui.com" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d"> | |
<dxui:ModalityLayout> | |
<dxui:ModalityLayout.Behaviors> | |
<dxui:SheetBehavior IsOpen="{Binding Source={x:Reference OpenSheetCheckBox}, Path=IsChecked}"> |
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
<ContentPage x:Class="DIPS.Xamarin.UI.Samples.Controls.Sheet.SheetPage" | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:dxui="http://dips.xamarin.ui.com" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d"> | |
<dxui:ModalityLayout> | |
<dxui:ModalityLayout.Behaviors> | |
<dxui:SheetBehavior> |
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
<ContentPage x:Class="DIPS.Xamarin.UI.Samples.Controls.Sheet.SheetPage" | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:dxui="http://dips.xamarin.ui.com" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d"> | |
<dxui:ModalityLayout> | |
<CheckBox HorizontalOptions="Center" | |
VerticalOptions="Center" /> |
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
<Label Text="Is visible if MyText is not empty" | |
IsVisible="{Binding MyText, Converter={converters:IsEmptyConverter Inverted=True}}" /> | |
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
<Label Text="Is visible if MyText is empty" | |
IsVisible="{Binding MyText, Converter={converters:IsEmptyConverter}}" /> | |
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 IsEmptyConverter : IValueConverter, IMarkupExtension | |
{ | |
public bool Inverted { get; set; } | |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
if(!(value is string stringValue)) return false; | |
return Inverted ? !string.IsNullOrEmpty(stringValue) : string.IsNullOrEmpty(stringValue); | |
} |
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 IsEmptyConverter : IValueConverter | |
{ | |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
if(!(value is string stringValue)) return false; | |
return string.IsNullOrEmpty(stringValue); | |
} |
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
namespace Visit.Mobile.MarkupExtensions | |
{ | |
/// <summary> | |
/// A string case extension that can be used in XAML with static values (like localized strings). | |
/// Using this is the same as using a string case converter for bindings. | |
/// </summary> | |
[ContentProperty(nameof(Input))] | |
public class StringCaseExtension : IMarkupExtension | |
{ | |
public string Input { get; set; } |
NewerOlder