ã¯ããã«
ãååã¾ã§ã®è¨äºã§ããã¼ã¿ãç»é¢ï¼ã³ã³ããã¼ã«ï¼ä¸ã«è¡¨ç¤ºããã¾ããããåã«åå¾ãã¦è¡¨ç¤ºããã«éãã¾ããï¼ä¸é¨ãã©ã¼ãããã®é¨åã¯ãã¤ã³ãã使ç¨ãã¾ããï¼ã
ãä»åã®è¨äºã§ã¯ãSilverlightã¢ããªã±ã¼ã·ã§ã³ä¸ã§åå¾ãããã¼ã¿ãããå°ãæãä¸ãã¦åãæ±ã£ã¦ã¿ã¾ããXAMLããã¤å¼·åãªãã¼ã¿ãã¤ã³ãæ©è½ãç¨ãã¦ããã¼ã¿ãµã¼ãã¹ããåå¾ãããã¼ã¿ãã©ã®ããã«æ±ãã¹ããã®ãã¤ã³ããç´¹ä»ãã¾ãã
ãã¾ãããã®é£è¼ã¯ãµã³ãã«ã·ã¹ãã ããã¼ã¹ã«èª¬æãè¡ãã¾ãã以ä¸ã®ãµã¤ããããµã³ãã«ã³ã¼ããå®è¡ãã¡ã¤ã«ãå ¥æãã¦ã確èªããªããèªã¿é²ãã¦ããã ããã¨ãããä¸å±¤ç解ãæ·±ã¾ãã¨æãã¾ãã
ãµã³ãã«ã¢ããªã±ã¼ã·ã§ã³ã®å ¬éãµã¤ã
Silverlightã¢ããªã±ã¼ã·ã§ã³ã®ãã¼ã¿ãã¤ã³ã
ããã¼ã¿ãã¤ã³ãã¨ã¯ããã¼ã¿ã½ã¼ã¹ã¨ã¿ã¼ã²ãããæåéããã¤ã³ãï¼çµã³ã¤ãï¼ãã¾ããããã«ãã£ã¦ããã¼ã¿ãç»é¢ã«è¡¨ç¤ºãããã¨ããã¼ã¿ã®å é¨ç®¡çãç°¡ç´ åãããã¨ãªã©ãå¯è½ã§ãã
ããåç¥ã®éããSilverlightã¯XAMLãæ¡ç¨ãã¦ããã®ã§ããã¼ã¿ãã¤ã³ãã¯XAMLãã¼ã¹ã®å®è£ ã«ãªãã¾ããä¾ãã°ãWindows Formã§ã®ãã¼ã¿ãã¤ã³ãã«ã¯ãBindingSourceã³ã³ããã¼ã«ã使ç¨ãããã¨ãå¯è½ã§ããããXAMLãã¼ã¹ã®ãã¼ã¿ãã¤ã³ãã«ã¯ããããç¹å®ã®ã³ã³ããã¼ã«ã¯åå¨ãã¦ãã¾ããããã®ä»£ããã«ãXAMLèªä½ã«ãã¤ã³ãã®æ©è½ãçµã¿è¾¼ã¾ãã¦ãã¾ããã³ã¼ãã£ã³ã°ãã¦ããããã§ããã¼ã¿ãã¤ã³ãã®å®è£ ã¯XAMLã®ãã¼ã¯ã¢ããè¨èªï¼éçï¼ãC#ãªã©ã®.NET Frameworkè¨èªï¼åçï¼ãã©ã¡ãã®å®è£ ãå¯è½ã§ãããä»åã®è¨äºã§ã¯XAMLãã¼ã¹ã§ç´¹ä»ãã¦ããã¾ãã
ãåºæ¬çãªæ§æã¯ä»¥ä¸ã«ãªãã¾ãã
<対象ãªãã¸ã§ã¯ã ããããã£=”{Binding ãã¹ã®å¤,ããã¤ã³ãã£ã³ã°ããããã£ã®å¤}”>
ãä¾ãã°TextBlockã³ã³ããã¼ã«ã§ããã°ã次ã®ããã«ãªãã¾ãã
<TextBlock x:Name="productNameTextBlock" Text="{Binding Product.Name}" FontSize="16" FontWeight="Bold" />
ãä¸è¨ã®ã³ã¼ãã§ã¯ãTextBlockã³ã³ããã¼ã«ã®Textããããã£ããã¤ã³ãã¿ã¼ã²ããã§ããããã«ãä½ããã®ãã¼ã¿ã§ããProduct.Nameã表示ãããå½¢ã«ãªãã¾ãã