{"id":811,"date":"2010-06-28T14:33:49","date_gmt":"2010-06-28T14:33:49","guid":{"rendered":"http:\/\/www.erbugkaya.com\/?p=811"},"modified":"2014-01-16T23:20:43","modified_gmt":"2014-01-16T23:20:43","slug":"expression-ile-wpf-uygulamasi-iv-etkilesim-tetikleme-ve-veri-filtreleme-expression-blend-2","status":"publish","type":"post","link":"http:\/\/erbugkaya.com\/?p=811","title":{"rendered":"Expression ile WPF Uygulamas\u0131 &#8211; IV &#8211; Etkile\u015fim Tetikleme ve Veri Filtreleme (Expression Blend 2)"},"content":{"rendered":"<p>11\/3\/2009<br \/>\nWPF uygulamas\u0131 geli\u015ftirdi\u011fimiz bu makale serisinin ilk ad\u0131m\u0131nda Expression Design 2 ile tasar\u0131m olu\u015fturduk. \u0130kinci ad\u0131mda Blend 2 ile proje olu\u015fturup, XAML \u00e7\u0131kt\u0131s\u0131 olan tasar\u0131m\u0131m\u0131z\u0131 bu projeye oturttuk ve ListBox&#8217;a XML&#8217;den veri \u00e7ektik. \u00dc\u00e7\u00fcnc\u00fc ad\u0131mda projelerimizde kulland\u0131\u011f\u0131m\u0131z WPF kontrollerinin g\u00f6rsel d\u00fczenlemelerini yapt\u0131k. Bu makalede de\u011fi\u015ftirdi\u011fimiz scroll bar\u0131n butonlar\u0131n\u0131n etkile\u015fimini tetiklemeyi ve kitap verilerimizi yazarlara g\u00f6re filtrelemeyi inceleyece\u011fiz. Ve b\u00f6ylece bu makale serisi tamamlanm\u0131\u015f olacak.<\/p>\n<p><!--more--><br \/>\nBa\u015flayal\u0131m. Layerlardan [ListBox]&#8217;\u0131 se\u00e7iyoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_74.jpg\" width=\"252\" height=\"179\" \/><\/p>\n<p>O malum breadcrumb yolunu kullanarak \u00fcst butonumuzun path&#8217;ine ula\u015f\u0131yoruz. (Bu yolu, serinin <a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/1000002142.ygpx\" target=\"_blank\">3. makalesinde<\/a> anlat\u0131yorum)<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_76.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_76.jpg\" width=\"389\" height=\"17\" \/><\/a><\/p>\n<p>\u00dc\u00e7gen buton path&#8217;i se\u00e7iliyken, Triggers kutusundaki +Property butonuna t\u0131kl\u0131yoruz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_77.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_77.jpg\" width=\"296\" height=\"259\" \/><\/a><\/p>\n<p>target-element&#8217;in yan\u0131ndaki oka t\u0131klay\u0131p a\u00e7\u0131lan men\u00fcden path&#8217;i se\u00e7iyoruz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_78.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_78.jpg\" width=\"274\" height=\"166\" \/><\/a><\/p>\n<p>Onun yan\u0131ndaki, \u015fu anda Delay olan oka t\u0131klay\u0131p a\u00e7\u0131lan men\u00fcden &#8220;IsMouseOver&#8221; \u0131 se\u00e7iyoruz. B\u00f6ylece mouse butonumuzun \u00fcst\u00fcne geldi\u011finde bir etkile\u015fim tetikleyece\u011fiz. \u00d6rne\u011fin butonun rengini de\u011fi\u015ftirece\u011fiz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_79.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_79.jpg\" width=\"246\" height=\"370\" \/><\/a><\/p>\n<p>Butonun rengini de\u011fi\u015ftirmek i\u00e7in \u00f6zelliklerdeki Brushes kutusunu kullan\u0131yoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_80.jpg\" width=\"278\" height=\"370\" \/><\/p>\n<p>Butonun gradient turuncusunu de\u011fi\u015ftiriyoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_81.jpg\" width=\"272\" height=\"194\" \/><\/p>\n<p>Di\u011fer butona da ayn\u0131 i\u015flemleri yap\u0131yoruz. Projeyi <strong>F5<\/strong> ile \u00e7al\u0131\u015ft\u0131r\u0131p butonlar\u0131n \u00fcst\u00fcne geldi\u011finizde butonun rengi de\u011fi\u015fmeli.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_82.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_82.jpg\" width=\"450\" height=\"352\" \/><\/a><\/p>\n<p>Evet etkile\u015fim tetiklemeyi inceledi\u011fimize g\u00f6re \u015fimdi filtrelemeye ge\u00e7ebiliriz. Bunun i\u00e7in \u00f6nce LayoutRoot&#8217;u se\u00e7iyoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_83.jpg\" width=\"261\" height=\"189\" \/><\/p>\n<p>Tool Box&#8217;da &#8220;Asset Library&#8221; ikonuna t\u0131kl\u0131yoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_84.jpg\" width=\"101\" height=\"68\" \/><\/p>\n<p>A\u00e7\u0131lan pencerede ComboBox &#8216;\u0131 se\u00e7iliyoruz. E\u011fer ComboBox g\u00f6z\u00fckm\u00fcyorsa sa\u011f \u00fcst k\u00f6\u015fedeki Show All&#8217;u t\u0131klay\u0131n.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_85.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_85.jpg\" width=\"397\" height=\"223\" \/><\/a><\/p>\n<p>Tasar\u0131m\u0131n sa\u011f \u00fcst k\u00f6\u015fesinde s\u00fcr\u00fckleyip b\u0131rakarak ComboBox&#8217;\u0131m\u0131z\u0131 olu\u015fturuyoruz. ComboBox&#8217;\u0131n boyutlar\u0131ndan ya da yerinden memnun de\u011filseniz dert etmeyin, bunu istedi\u011finiz zaman de\u011fi\u015ftirebilirsiniz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_86.jpg\" width=\"253\" height=\"176\" \/><\/p>\n<p>Layer d\u00fczeni \u015fu \u015fekilde olu\u015fmu\u015ftur.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_87.jpg\" width=\"262\" height=\"203\" \/><\/p>\n<p>ComboBox se\u00e7iliyken Properties sekmesindeki Common Properties kutusunda bulunan ItemSource&#8217;un sa\u011f\u0131ndaki k\u00fc\u00e7\u00fck kareye t\u0131kl\u0131yoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_88.jpg\" width=\"283\" height=\"302\" \/><\/p>\n<p>A\u00e7\u0131lan men\u00fcde Data Binding&#8217;e t\u0131kl\u0131yoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_89.jpg\" width=\"228\" height=\"285\" \/><\/p>\n<p>A\u00e7\u0131lan Create Data Binding penceresinde solda KitapDataSource&#8217;a t\u0131kl\u0131yoruz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_90.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_90.jpg\" width=\"376\" height=\"353\" \/><\/a><\/p>\n<p>Sa\u011fda @ Yazar : (String)&#8217;i se\u00e7iyoruz ve Finish&#8217;e bas\u0131yoruz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_91.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_91.jpg\" width=\"370\" height=\"352\" \/><\/a><\/p>\n<p>B\u00f6ylece ComboBox&#8217;\u0131m\u0131za yazarlar\u0131 \u00e7ekmi\u015f olduk.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_92.jpg\" width=\"415\" height=\"237\" \/><\/p>\n<p>\u015eimdi gelelim ComboBox&#8217;da se\u00e7ilen yazara g\u00f6re ListBox&#8217;\u0131n filtrelenmesinin ayarlanmas\u0131na. ListBox&#8217;\u0131 se\u00e7iyoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_93.jpg\" width=\"259\" height=\"202\" \/><\/p>\n<p>ListBox Common Properties&#8217;deki DataContext&#8217;in sa\u011f\u0131ndaki k\u00fc\u00e7\u00fck kareye t\u0131klay\u0131p, a\u00e7\u0131lan men\u00fcde Data Binding&#8217;e t\u0131kl\u0131yoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_94.jpg\" width=\"281\" height=\"234\" \/><\/p>\n<p>Create Data Binding penceresinde &#8220;Element Property&#8221; sekmesine t\u0131kl\u0131yoruz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_95.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_95.jpg\" width=\"375\" height=\"353\" \/><\/a><\/p>\n<p>Solda Combox ile ilgili olan se\u00e7ene\u011fi se\u00e7iyoruz. (System.Windows.Controls.ComboBox \u015feklinde yaz\u0131yor olacak)<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_96.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_96.jpg\" width=\"373\" height=\"351\" \/><\/a><\/p>\n<p>Sa\u011fda a\u00e7\u0131lan se\u00e7eneklerden &#8220;SelectedItem:(Object)&#8221; i se\u00e7ip Finish&#8217;e bas\u0131yoruz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_97.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_97.jpg\" width=\"377\" height=\"353\" \/><\/a><\/p>\n<p>Yine ListBox&#8217;\u0131n Common Properties&#8217;inde ItemSource&#8217;un sa\u011f\u0131ndaki k\u00fc\u00e7\u00fck kareye t\u0131kl\u0131yoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_98.jpg\" width=\"280\" height=\"234\" \/><\/p>\n<p>A\u00e7\u0131lan men\u00fcde yine Data Binding&#8217;e t\u0131kl\u0131yoruz.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_99.jpg\" width=\"277\" height=\"345\" \/><\/p>\n<p>A\u00e7\u0131lan Create Data Binding penceresinde &#8220;Explicit Data Context&#8221; sekmesine t\u0131kl\u0131yoruz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_100.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_100.jpg\" width=\"376\" height=\"354\" \/><\/a><\/p>\n<p>Ve burada KITAP (Array) i se\u00e7ip Finish&#8217;e bas\u0131yoruz.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_101.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_101.jpg\" width=\"373\" height=\"352\" \/><\/a><\/p>\n<p><strong>F5<\/strong> e bas\u0131p projeye \u00e7al\u0131\u015ft\u0131rd\u0131\u011f\u0131n\u0131zda alttaki gibi g\u00f6z\u00fckmeli.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_102.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_102.jpg\" width=\"270\" height=\"211\" \/><\/a><\/p>\n<p>Ve her \u015feyi do\u011fru yapt\u0131ysan\u0131z ComboBox&#8217;da ba\u015fka bir yazar se\u00e7erseniz,<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_103.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_103.jpg\" width=\"450\" height=\"351\" \/><\/a><\/p>\n<p>O yazar\u0131n kitaplar\u0131 listelenmeli.<\/p>\n<p><a href=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_104.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/www.yazgelistir.com\/Makaleler\/Resimler\/1000002144_104.jpg\" width=\"450\" height=\"350\" \/><\/a><\/p>\n<p>B\u00f6ylece &#8220;Expression ile WPF Uygulamas\u0131&#8221; makale serisi burada tamamlanm\u0131\u015f oluyor ve bu sayede ilk WPF Uygulamam\u0131z\u0131 (Windows) geli\u015ftirmi\u015f oluyoruz. Hem de hi\u00e7 kod kullanmadan. Elbette Expression Studio&#8217;nun \u00f6zellikleri bunlarla s\u0131n\u0131rl\u0131 de\u011fil. Kontrollere gelen tasar\u0131m de\u011fi\u015ftirebilme \u00f6zelli\u011fi, kolayca eklenebilen etkile\u015fimler ve arkada duran Visual Studio kod deste\u011fi ile yap\u0131labilecekleri hayal etmek bile \u00e7ok zevkli. Expression Blend 2&#8217;nin \u00f6zelliklerini anlatmaya devam edece\u011fim di\u011fer makalelerde g\u00f6r\u00fc\u015fmek \u00fczere. Elbette esas amac\u0131m\u0131z olan Silverlight&#8217;a ula\u015fmaya \u00e7al\u0131\u015f\u0131yoruz. Bunun i\u00e7inde toolar\u0131m\u0131za hakim olmal\u0131y\u0131z.<\/p>\n<p>\u0130yi \u00e7al\u0131\u015fmalar<\/p>\n<p>Te\u015fekk\u00fcrler.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>11\/3\/2009 WPF uygulamas\u0131 geli\u015ftirdi\u011fimiz bu makale serisinin ilk ad\u0131m\u0131nda Expression Design 2 ile tasar\u0131m olu\u015fturduk. \u0130kinci ad\u0131mda Blend 2 ile proje olu\u015fturup, XAML \u00e7\u0131kt\u0131s\u0131 olan tasar\u0131m\u0131m\u0131z\u0131 bu projeye oturttuk ve ListBox&#8217;a XML&#8217;den veri \u00e7ektik. \u00dc\u00e7\u00fcnc\u00fc ad\u0131mda projelerimizde kulland\u0131\u011f\u0131m\u0131z WPF kontrollerinin g\u00f6rsel d\u00fczenlemelerini yapt\u0131k. Bu makalede de\u011fi\u015ftirdi\u011fimiz scroll bar\u0131n butonlar\u0131n\u0131n etkile\u015fimini tetiklemeyi ve kitap verilerimizi yazarlara [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[41,21,47],"class_list":["post-811","post","type-post","status-publish","format-standard","hentry","category-teknik-yazi","tag-expression-blend","tag-expression-studio","tag-wpf"],"_links":{"self":[{"href":"http:\/\/erbugkaya.com\/index.php?rest_route=\/wp\/v2\/posts\/811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/erbugkaya.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/erbugkaya.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/erbugkaya.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/erbugkaya.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=811"}],"version-history":[{"count":4,"href":"http:\/\/erbugkaya.com\/index.php?rest_route=\/wp\/v2\/posts\/811\/revisions"}],"predecessor-version":[{"id":2448,"href":"http:\/\/erbugkaya.com\/index.php?rest_route=\/wp\/v2\/posts\/811\/revisions\/2448"}],"wp:attachment":[{"href":"http:\/\/erbugkaya.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/erbugkaya.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=811"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/erbugkaya.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}