Skip to content

Instantly share code, notes, and snippets.

View tugcearar's full-sized avatar
🍋

Tuğçe Arar tugcearar

🍋
View GitHub Profile
//
// Summary:
// Defines a command.
public interface ICommand
{
//
// Summary:
// Occurs when changes occur that affect whether or not the command should execute.
event EventHandler CanExecuteChanged;
<?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/>
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Input;
using Xamarin.Forms;
namespace XamarinFormsCommandDemo
{
public class MainViewModel : INotifyPropertyChanged
{
<meta property="og:locale" content="tr_TR" />
<meta property="og:type" content="article" />
<meta property="og:title" content="iOS Link Presentation Kütüphanesinin Xamarin Forms&#039;da Kullanımı - Tuğçe Arar" />
<meta property="og:description" content="Link presentation iOS 13 ile birlikte eklenen ve kendi native uygulamalarında zaten kullanılan bir kütüphanedir. Bu kütüphane sayesinde, geliştiriciler artık kendi uygulamlarında zengin URL’leri görüntülerken özelleştirebilirler. Apple bu kütüphaneyi zaten kullanıyor demiştim yani son kullanıcı..." />
<meta property="og:url" content="https://stugcearar.com/2019/09/29/ios-link-presentation-kutuphanesinin-xamarin-formsda-kullanimi-2/" />
<meta property="og:site_name" content="Tuğçe Arar" />
<meta property="og:image" content="https://stugcearar.com/wp-content/uploads/2019/09/banner_lp-2.png" />
[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)
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), "");
<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>
<?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>
<?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">
<?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>