{"id":1393,"date":"2018-08-30T20:09:46","date_gmt":"2018-08-30T20:09:46","guid":{"rendered":"https:\/\/sezeromer.com\/?p=1393"},"modified":"2023-02-27T00:11:10","modified_gmt":"2023-02-26T21:11:10","slug":"xamarin-form-resme-tiklama","status":"publish","type":"post","link":"https:\/\/sezeromer.com\/en\/xamarin-form-resme-tiklama\/","title":{"rendered":"Xamarin Form Tapped Image"},"content":{"rendered":"<!-- wp:paragraph -->\r\n<p>Hello friends. In this article, we will get a picture click feature with Xamarin Forms. There&#8217;s actually a very simple way of doing this.<\/p>\r\n<!-- \/wp:paragraph -->\r\n<p>&nbsp;<\/p>\r\n<!-- wp:paragraph -->\r\n<p>First you come to the design screen and here you are first controlling an image. Which picture or position does not matter at all. After you give us the design features you want to control the image, we need to assign a TapGestureRecognizer between the GestureRecognizers properties. With this feature, this function will work when the image is touched once. If you do not build it, Visual Studio will automatically create the functions for you, but the variables that you will get from the outside are as below.<\/p>\r\n<!-- \/wp:paragraph -->\r\n<p>&nbsp;<\/p>\r\n<div class=\"wp-block-codemirror-blocks code-block \">\r\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;swift&quot;,&quot;mime&quot;:&quot;text\/x-swift&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;ContentPage xmlns=\"http:\/\/xamarin.com\/schemas\/2014\/forms\"\r\n             xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2009\/xaml\" \r\n             xmlns:local=\"clr-namespace:ResmeTiklama\" \r\n             x:Class=\"ResmeTiklama.MainPage\"&gt;\r\n    &lt;StackLayout&gt;\r\n        &lt;!-- Place new controls here --&gt;\r\n        &lt;Image Source=\"fenerbahce.png\"\r\n               HorizontalOptions=\"Center\"\r\n               VerticalOptions=\"Center\"\r\n               WidthRequest=\"200\"\r\n               HeightRequest=\"200\"&gt;\r\n            &lt;Image.GestureRecognizers&gt;\r\n                &lt;TapGestureRecognizer Tapped=\"tiklandi\"\/&gt;\r\n            &lt;\/Image.GestureRecognizers&gt;\r\n            \r\n        &lt;\/Image&gt;\r\n    &lt;\/StackLayout&gt;\r\n&lt;\/ContentPage&gt;<\/pre>\r\n<\/div>\r\n<p>&nbsp;<\/p>\r\n<div class=\"wp-block-codemirror-blocks code-block \">\r\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;swift&quot;,&quot;mime&quot;:&quot;text\/x-swift&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Xamarin.Forms;\r\n\r\nnamespace ResmeTiklama\r\n{\r\n    public partial class MainPage : ContentPage\r\n    {\r\n        public MainPage()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        \/\/ T\u0131klnad\u0131\u011fnda olu\u015facaklar\u0131n metodu\r\n        private void tiklandi(object sender,EventArgs e)\r\n        {\r\n            DisplayAlert(\"Ba\u015far\u0131l\u0131\", \"Foto\u011frafa t\u0131kland\u0131...\", \"OK\");\r\n        }\r\n    }\r\n}<\/pre>\r\n<\/div>\r\n<!-- \/wp:code -->\r\n\r\n<!-- wp:paragraph -->\r\n<p>What I&#8217;m trying to do here is giving a message to the screen where the photo is touched. So it seems that the photo is touched. You can customize it for your own projects. If you have any questions, please feel free to mail or comment me.<\/p>\r\n<!-- \/wp:paragraph -->","protected":false},"excerpt":{"rendered":"<p>Hello friends. In this article, we will get a picture click feature with Xamarin Forms. There&#8217;s actually a very simple way of doing this. &nbsp; First you come to the design screen and here you are first controlling an image. Which picture or position does not matter at all. After you give us the design [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":245,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[289,288,3],"tags":[544,152,545,189,543,541,22],"class_list":["post-1393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","category-ios","category-xamarin-ile-yapilmis-projeler","tag-gesture","tag-image","tag-recognizers","tag-resim","tag-tap","tag-xaarin-forms","tag-xamarin"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1393"}],"collection":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/comments?post=1393"}],"version-history":[{"count":3,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1393\/revisions"}],"predecessor-version":[{"id":2604,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1393\/revisions\/2604"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media\/245"}],"wp:attachment":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media?parent=1393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/categories?post=1393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/tags?post=1393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}