{"id":1582,"date":"2019-04-25T13:32:17","date_gmt":"2019-04-25T13:32:17","guid":{"rendered":"https:\/\/sezeromer.com\/?p=1582"},"modified":"2023-02-27T22:03:49","modified_gmt":"2023-02-27T19:03:49","slug":"xamarin-forms-material-design","status":"publish","type":"post","link":"https:\/\/sezeromer.com\/en\/xamarin-forms-material-design\/","title":{"rendered":"Xamarin Forms Material Design"},"content":{"rendered":"<p>Hello friends. In this article, we will talk about how to use <strong>Material Design<\/strong> in Xamarin Forms. If you ask what<strong> Material Design<\/strong> is, it is the design interface introduced by Google. With Material Design, you can design your mobile application much more easily without much effort.<\/p>\n<p><strong>Material Design<\/strong> came to Xamarin Forms with 3.6. In this package, where radical changes are presented, the most striking features are the designs. In this article, I will talk about the differences between the designs.<\/p>\n<p>First we open an empty project and start to design. In this design, I will use 2 entries and 1 button as an example. Click <a href=\"https:\/\/devblogs.microsoft.com\/xamarin\/beautiful-material-design-android-ios\/\">here<\/a> for more information.<\/p>\n<p>The screen designs you see below are normal designs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1583\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2019\/04\/Ekran-Resmi-2019-04-25-15.12.30.png\" sizes=\"(max-width: 516px) 100vw, 516px\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2019\/04\/Ekran-Resmi-2019-04-25-15.12.30.png 516w, https:\/\/sezeromer.com\/wp-content\/uploads\/2019\/04\/Ekran-Resmi-2019-04-25-15.12.30-173x300.png 173w\" alt=\"\" width=\"516\" height=\"897\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1584\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2019\/04\/1-576x1024.jpg\" sizes=\"(max-width: 576px) 100vw, 576px\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2019\/04\/1-576x1024.jpg 576w, https:\/\/sezeromer.com\/wp-content\/uploads\/2019\/04\/1-169x300.jpg 169w, https:\/\/sezeromer.com\/wp-content\/uploads\/2019\/04\/1.jpg 720w\" alt=\"\" width=\"576\" height=\"1024\" \/><\/p>\n<p>In order to use Material Design, our Xamarin.Forms package must be at least 3.6 and the Xamarin.Forms.Visual.Material package must be installed. After making sure that these packages exist, this package needs to be initialized.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\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;}\">Xamarin.Essentials.Platform.Init(this, savedInstanceState);\r\n            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);\r\n            global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState);<\/pre>\n<\/div>\n<div class=\"wp-block-codemirror-blocks code-block \">\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;}\">public override bool FinishedLaunching(UIApplication app, NSDictionary options)\r\n        {\r\n            global::Xamarin.Forms.Forms.Init();\r\n            global::Xamarin.Forms.FormsMaterial.Init();\r\n            LoadApplication(new App());\r\n\r\n            return base.FinishedLaunching(app, options);\r\n        }<\/pre>\n<\/div>\n<p>You can then give ContentPage a visual if you want to change the image of the entire page. If you just want to change the button or entry, you can give it to them.<\/p>\n<p>Design codes;<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\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:XamMaterialDesign\" \r\n             x:Class=\"XamMaterialDesign.MainPage\"\r\n             Visual=\"Material\"&gt;\r\n    &lt;StackLayout HorizontalOptions=\"FillAndExpand\" VerticalOptions=\"FillAndExpand\" Margin=\"20,40\" BackgroundColor=\"#eee\"&gt;\r\n       &lt;Grid BackgroundColor=\"White\" HorizontalOptions=\"FillAndExpand\" VerticalOptions=\"CenterAndExpand\" Margin=\"20,40\" Padding=\"20,40\"&gt;\r\n            &lt;Grid.RowDefinitions&gt;\r\n                &lt;RowDefinition Height=\"auto\"\/&gt;\r\n                &lt;RowDefinition Height=\"auto\"\/&gt;\r\n                &lt;RowDefinition Height=\"auto\"\/&gt;\r\n            &lt;\/Grid.RowDefinitions&gt;\r\n            &lt;Entry Grid.Row=\"0\" HorizontalOptions=\"FillAndExpand\" VerticalOptions=\"Center\" Placeholder=\"Kullan\u0131c\u0131 Ad\u0131\" BackgroundColor=\"#eee\"\/&gt;\r\n            &lt;Entry Grid.Row=\"1\" HorizontalOptions=\"FillAndExpand\" VerticalOptions=\"Center\" Placeholder=\"\u015eifre\" BackgroundColor=\"#eee\"\/&gt;\r\n            &lt;Button Grid.Row=\"2\" HorizontalOptions=\"FillAndExpand\" VerticalOptions=\"Center\" Text=\"Giri\u015f Yap\" BackgroundColor=\"Blue\"\r\n                    TextColor=\"White\"\/&gt;\r\n        &lt;\/Grid&gt;\r\n    &lt;\/StackLayout&gt;\r\n&lt;\/ContentPage&gt;<\/pre>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1586\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2019\/04\/4.gif\" alt=\"\" width=\"397\" height=\"821\" \/><\/p>\n<p>If you have questions, you can reach us by e-mail or comment.<\/p>","protected":false},"excerpt":{"rendered":"<p>Hello friends. In this article, we will talk about how to use Material Design in Xamarin Forms. If you ask what Material Design is, it is the design interface introduced by Google. With Material Design, you can design your mobile application much more easily without much effort. Material Design came to Xamarin Forms with 3.6. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1586,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[289,1,288,3],"tags":[114,579,612,403,115,611,441,22,119],"class_list":["post-1582","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","category-c-ile-ilgili-yazilar","category-ios","category-xamarin-ile-yapilmis-projeler","tag-android","tag-design","tag-fancy","tag-forms","tag-ios","tag-material","tag-visual","tag-xamarin","tag-xamarin-forms"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1582"}],"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=1582"}],"version-history":[{"count":5,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1582\/revisions"}],"predecessor-version":[{"id":2629,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/1582\/revisions\/2629"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media\/1586"}],"wp:attachment":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media?parent=1582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/categories?post=1582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/tags?post=1582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}