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
// | |
// Summary: | |
// Defines a command. | |
public interface ICommand | |
{ | |
// | |
// Summary: | |
// Occurs when changes occur that affect whether or not the command should execute. | |
event EventHandler CanExecuteChanged; |
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"?> | |
<ContentPage 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
x:Class="XamarinFormsCommandDemo.MainPage" | |
xmlns:vm="clr-namespace:XamarinFormsCommandDemo"> | |
<ContentPage.BindingContext> | |
<vm:MainViewModel/> |
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.ComponentModel; | |
using System.Runtime.CompilerServices; | |
using System.Windows.Input; | |
using Xamarin.Forms; | |
namespace XamarinFormsCommandDemo | |
{ | |
public class MainViewModel : INotifyPropertyChanged | |
{ |
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
[assembly: ExportRenderer(typeof(LPView), typeof(LPViewRenderer))] | |
namespace XFLPApp.iOS.CustomRenderers | |
{ | |
public class LPViewRenderer : ViewRenderer<LPView, LPLinkView> | |
{ | |
protected override void OnElementChanged(ElementChangedEventArgs<LPView> e) | |
{ | |
base.OnElementChanged(e); | |
if (e.OldElement != null || Element == null) return; | |
if (e.NewElement != null) |
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 LPView:View | |
{ | |
public LPView() | |
{ | |
this.VerticalOptions = LayoutOptions.FillAndExpand; | |
this.HorizontalOptions = LayoutOptions.FillAndExpand; | |
} | |
public static readonly BindableProperty UrlProperty = | |
BindableProperty.Create("Url", typeof(string), typeof(LPView), ""); |
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
<StackLayout Margin="20,40" Orientation="Vertical" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> | |
<controls:LPView Url="https://www.thegamer.com/assassins-creed-odyssey-things-previous-players-noticed/"/> | |
<controls:LPView Url="https://www.thegamer.com/dungeons-dragons-pro-tips-building-powerful-characer/"/> | |
<controls:LPView Url="https://www.thegamer.com/henry-cavill-the-witcher-sword-image/"/> | |
</StackLayout> |
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" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="MyProject.Views.MyPage" | |
xmlns:vm="clr-namespace:MyProject.ViewModels" | |
x:Name="myPage"> | |
<ContentPage.BindingContext> | |
<vm:MyPageViewModel/> | |
</ContentPage.BindingContext> | |
<ContentPage.Content> |
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"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Bindable Snippet</Title> | |
<Author>Sumeyya Tugce Arar</Author> | |
<Shortcut>bindable</Shortcut> | |
</Header> | |
<Snippet> | |
<Code Language="CSHARP"> |
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"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Android Platform Spec Snippet</Title> | |
<Author>Sumeyya Tugce Arar</Author> | |
<Description>Xaml namespace</Description><Author>Myself</Author> | |
<Shortcut>andSpec</Shortcut> | |
</Header> | |
<Snippet> |