Imagine CupïŒWindows Phone Challengeã®ã¢ããªã±ãŒã·ã§ã³ãçµäºããåã«ã2é±é以äžãæ®ããŸãããããè¡ãæéã§ãïŒ ãã ãã SketchFlowã§äœæããã¢ããªã±ãŒã·ã§ã³ãããã¿ã€ããæ·»ä»ããå¿ èŠããããŸãã ä»æ¥ã¯ãããäœæããæ¹æ³ã«ã€ããŠã話ããŸãã
泚æãã«ããã®äžã«ããããã®åçïŒ
å§ããæºåã¯ã§ããŸãããïŒ
ããã§ãããªãã¯ã¢ããªã±ãŒã·ã§ã³ãæžããŠãã¢ããªã±ãŒã·ã§ã³ã®ããŒããæãã€ããŸãããããã¯ãããã¿ã€ãã®å Žåã®ãŸãŸã§ãã äœæããã«ã¯ã次ã®ãã®ãå¿ èŠã§ãã
- Windows Phone SDK
- Expression Blend 4 ïŒåŠçã¯Dreamsparkã§ç¡æã§å©çšã§ããŸãïŒ
- Windows Phoneçšã®ã¹ã±ãããããŒãã³ãã¬ãŒã
- Windows Phone SilverlightããŒã«ããã
SketchFlowãã³ãã¬ãŒããã€ã³ã¹ããŒã«ããåŸã Expression Blendã§æ°ãããããžã§ã¯ããäœæãããšã Windows Phone SketchFlowã¢ããªã±ãŒã·ã§ã³ãéžæã§ããããã«ãªããŸãã
ä»åã¯ãµã³ãã«ã¢ããªã±ãŒã·ã§ã³ãéçºããããããã¿ã€ããäœæãããšãã«åœ¹ç«ã€äž»ãªæ©èœã®ã¿ã瀺ããŸãã ã¹ã±ããã®ç®çã¯ä¿¡é Œæ§ã®é«ããããã¿ã€ããäœæããããšã§ã¯ãªããäžè¬çãªçšèªã§ã¢ããªã±ãŒã·ã§ã³ã®å€èŠ³ãšåºæ¬çãªæ©èœã瀺ãããšã§ãã
åææ¡ä»¶
ãã®èšäºã¯ãå°ãªããšãäžè¬çãªçšèªã§SketchFlowã«ç²ŸéããŠãã人ã察象ãšããŠããŸãã åºæ¬çãªåçãç解ããããã«ã kichik ïŒ 1ã2ã3ïŒã«ããäžé£ã®èšäºãExpression Blend + SketchFlowã§ã®ãããã¿ã€ãã³ã°ãã«ç²Ÿéããããšããå§ãããŸãã ãã¹ãŠãä»ããéå§ã§ããŸãïŒ
Sketchflowããã
SketchFlowãããã¯ãç»é¢ãšã³ã³ããŒãã³ãéã®ãã¹ãŠã®æ¥ç¶ã瀺ãã¢ããªã±ãŒã·ã§ã³ã®ãããã§ãã åææ¡ä»¶é ç®ãã2çªç®ã®èšäºãèªããšããããã®äž»ãªæ©èœã¯æ°ããç»é¢ãšã³ã³ããŒãã³ãïŒã³ã³ããŒãã³ãç»é¢ãè€æ°ã®ããŒãžã«è¡šç€ºãããèŠçŽ ïŒã®è¿œå ã§ããããšãããããŸãã
Windows Phoneã®ã¹ã±ããã®æ©èœ-ãããžã§ã¯ããäœæãããšãã«ã4ã€ã®ç»é¢ãäœæããŸãã3ã€ã®ã·ã¹ãã ãšã¢ããªã±ãŒã·ã§ã³ã®ã¡ã€ã³ç»é¢ïŒ
ãæ°ã¥ããããããŸãããããã¹ãŠã®ã¢ããªã±ãŒã·ã§ã³ç»é¢ã¯ã¡ã€ã³ç»é¢ïŒããŒã ïŒãšæ€çŽ¢ç»é¢ïŒæ€çŽ¢ïŒã«æ¥ç¶ãããŠããŸãã ããã¯ãé»è©±ã®ã¹ã±ããã§é©åãªãã¿ã³ãæŒãããšãåŠçããããã«è¡ãããŸãã
ãŸããã¡ã€ã³ããŒãžãšã¢ããªã±ãŒã·ã§ã³ããŒãžã§ãã¿ã€ã«ãŸãã¯ããŒã¹ãéç¥çšã®ç¬èªã®ã¢ã€ã³ã³ãäœæã§ããŸãã
æ°ããç»é¢ãäœæãããšãããŒã ç»é¢ãšæ€çŽ¢ç»é¢ãžã®ãªã³ã¯ãèªåçã«äœæãããŸãã
ããŒãžããã²ãŒã·ã§ã³
ããŒãžéã®ããã²ãŒã·ã§ã³ãäœæããæ¹æ³ã¯2ã€ãããŸãã ããã€ãã¢ãŒãŸãã¯ããŠã¹ã®å³ãã¿ã³ã䜿çšããŸãïŒå®éãããã¯åãããšã§ããã2çªç®ã®ã±ãŒã¹ã§ã¯èº«äœã®åããå°ãªããŠæžã¿ãŸãïŒã ããã€ãã¢ã«ã€ããŠã¯å°ãåŸã§èª¬æããŸãããããã§ã¯ç°¡åãªæ¹æ³ã䜿çšããŸãããã
ç¶æ ãšã¢ãã¡ãŒã·ã§ã³ãäœæãã
èŠçŽ ã®ãã©ã¡ãŒã¿ãŒãå€æŽããã«ã¯ããç¶æ ãã¿ãã䜿çšããŸãã ã芧ã®ãšãããæåã¯Windows Phoneã® SketchFlowãã³ãã¬ãŒãã«ã¯ããã§ã«2ã€ã®ç¶æ ããããŸããé»è©±ã®çžŠäœçœ®ãšæšªäœçœ®ã§ãã ç¶æ ã°ã«ãŒããäœæããŸãããïŒã¿ãã®å³äžã«ãã[ç¶æ ã°ã«ãŒãã®è¿œå ]ãã¿ã³ïŒã [ç¶æ ã®è¿œå ]ãã¿ã³ã䜿çšããŠããã®ã°ã«ãŒãã«ç¶æ ãè¿œå ã§ããŸãã äŸãšããŠãéåžžã®TextBlockã§ããã¹ãã®äžéæ床ãå€æŽããŸãã
ããããã®ç¶æ ãã¯ãªãã¯ãããšãäœæ¥ãŠã£ã³ããŠãèµ€æ ã§å²ãŸããŸããããã¯ããã®ã€ãã³ããžã®ç§»è¡æã«å€æŽãèšé²ããã³åçŸãããããšãæå³ããŸãã åæç¶æ ã«æ»ãã«ã¯ããç¶æ ãã¿ãã§ã ããŒã¹ããéžæããŸãã
ãããã£ãŠãæ°ããç¶æ ãäœæããŸãã
- åºæ¬ç¶æ ãéžæãããŠããããšã確èªããŠãã ããã ã¢ã€ãã ã®äžéæ床ã0ã«å€æŽããŸãã
- äœæããç¶æ ãéžæããŸãã èµ€ããã¬ãŒã ã衚瀺ãããããèšé²ãéå§ã§ããŸãã [ ã¿ã€ã ã©ã€ã³ã衚瀺]ãã¿ã³ãã¯ãªãã¯ããŸãã
- ããŒãã¬ãŒã ãäœæããã¹ã©ã€ããŒãæ°ç§éåãããŠã äžéæ床ã 100ã«èšå®ãããå¥ã®ããŒãã¬ãŒã ãäœæããŸãã
- ã¢ãã¡ãŒã·ã§ã³ã®äœæãçµäºãããã ããŒã¹ç¶æ ãå床éžæãã äžéæ床ã0ã§ããããšã確èªããŸãã
ã¯ãªãã¯å¯èœ
ãã®ãããç¶æ ãäœæããŸããããã¿ã³ãã¯ãªãã¯ãããšãã«åŒã³åºããŠã¿ãŸãããã æ®å¿µãªãããã³ã³ããã¹ãã¡ãã¥ãŒããç¶æ ããã€ã³ãã§ããŸããã§ããïŒãã¿ã³ãå³ã¯ãªãã¯ããŠãç¶æ ãã¢ã¯ãã£ãã«ããŸãïŒã ãããã£ãŠã[ è³ç£ ]ã¿ãã«ç§»åãã[ åäœ ]ãéžæããŠã GoToStateActionããã¿ã³ã«ãã©ãã°ããŸãã
ä»»æã®åäœã«ã€ããŠãã€ãã³ãïŒãã¿ã³- ã¯ãªã㯠ïŒã«ããã€ãã®æ¡ä»¶ãå²ãåœãŠãçºçããç¶æ ãæå®ã§ããŸãã
ãã¹ãŠãæ£ããè¡ã£ãå Žåããã©ãŠã¶ã§ãããã¿ã€ããèµ·åããåŸããã¿ã³ãã¯ãªãã¯ãããšãããã¹ããã¹ã ãŒãºã«è¡šç€ºãããŸãã
ã¹ãã¬ãŒãžã䜿çšããããŒã¿è»¢é
ããŒãžéã§ããŒã¿ã転éããå¿ èŠã®ãªãã¢ããªã±ãŒã·ã§ã³ãæ³åããããšã¯å°é£ã§ãã å®éã®ã¢ããªã±ãŒã·ã§ã³ãäœæããå Žåããã©ã¡ãŒã¿ãŒãæž¡ãããäœããã®éçãã£ãŒã«ããäœæããããšã§ããã®åé¡ãç°¡åã«è§£æ±ºã§ããŸãã ãããã SketchFlowãããã¿ã€ãã§ããŒã¿ãéä¿¡ããå¿ èŠãããå Žåã¯ã©ãã§ããããïŒ SketchFlowã«ã¯çµã¿èŸŒã¿ã®ããŒã¿ã¹ãã¬ãŒãžãããã€ããããããã䜿çšããã«ã¯SetDataStoreValueActionã®åäœã圹ç«ã¡ãŸãã
åã®äŸãå°ãè€éã«ããŸãããã ããã§ã TextBoxã®ããã¹ããTextBlockã«è¡šç€ºãããŸã ã ãã¡ãããããã¯éåžžã®Bindingã䜿çšããŠå®è£ ã§ããŸãããçµã¿èŸŒã¿ã¹ãã¬ãŒãžã䜿çšããŠãããè¡ãæ¹æ³ãåŠç¿ããåŸãåãæ¹æ³ã§ããŒãžéã§ããŒã¿ã転éã§ããŸãã
ãã¿ã³ã«æ°ããåäœ SetDataStoreValueAction ãè¿œå ããŸãã ãã®ããããã£ã«ç§»åãã[ Common Properties ]ã¿ãã§[ Property ]ãã£ãŒã«ããã¯ãªãã¯ããŠã DataStoreã«æ°ããããããã£ãäœæããŸã ã ç§ã¯ãããnew_textãšåŒã³ãŸãã ã 次ã«ãå€ãå²ãåœãŠãå¿ èŠããããŸãã ãã®å Žåãã å€ããã£ãŒã«ãã®å³åŽã®ããã¯ã¹ãã¯ãªãã¯ããã èŠçŽ ããããã£ã®ãã€ã³ã ããéžæããŠTextBoxããã€ã³ãããå¿ èŠããããŸã ã
ããã§ãå€æ°ã®å€ãTextBlockã« ãã€ã³ãããŸããTextBlockããããã£ã®Textãã£ãŒã«ãã®æšªã«ããããã¯ã¹ãã¯ãªãã¯ããã¡ãã¥ãŒããBindingãéžæããŸãã
ã§ããïŒ ã¢ããªã±ãŒã·ã§ã³ãå床å®è¡ããŠãã¹ãã¬ãŒãžäœ¿çšéã®æäœæ§ã確èªã§ããŸãã ãã¡ãããåäžã®ããŒãžå ã§ããŒã¿ã転éããããã«ããã䜿çšããããšã®å©ç¹ã¯çãããã§ãããè€æ°ããŒãžã®ããŒã¿ã¢ããªã±ãŒã·ã§ã³ãéçºããå Žåããã®ã¢ãããŒãã¯äžå¯æ¬ ã§ãã
ãããã/ããã©ãèŠçŽ ã®äœ¿çš
æ®å¿µãªããã SketchFlowã§ã®ããã©ãããŒãžãŸãã¯ããããããŒãžã®æäœã¯ ã å®è£ ãããªãäžååã§ãã ãã¡ããããã¢ã¢ãŒãã§ã¯ãããã®ããŒãžã¯æ£åžžã«åäœãããžã§ã¹ãã£ãŒã«å¿çããŠã¹ã ãŒãºã«ã¹ã¯ããŒã«ããŸãããäœæã¢ãŒãã§ã¯æåã®ããŒãžãã衚瀺ãããã[ ãªããžã§ã¯ããšã¿ã€ã ã©ã€ã³ ]ã¿ãã§ããŒãžãå€æŽããŠããå®éã®ç·šéæã®ããã«ããã©ãã¯åãæ¿ãããŸããExpression Blendã®ããŒãžã
ããã©ããããŒãžã«è¿œå ããäœææžã¿ã®èŠçŽ ãæåã®PanoramaItemã«ãã©ãã°ããŸãããã
2çªç®ã®PanoramaItemãéžæãããšããšãã£ã¿ãŒã¯ããã«åãæ¿ããŸããã ããã«ãããããã©ãã®ä»ã®èŠçŽ ã®ã³ã³ãã³ããç·šéãããšãã«å°ããªåé¡ãçºçããŸãã ãã®å Žåã2çªç®ã®ã¢ã€ãã ããŸã å°ãèŠããå Žåã3ã€ä»¥äžã®èŠçŽ ã䜿çšããŠããå ŽåããŸãã¯ããŒãžã«ããã©ããå«ãŸããŠããªãããããããããå ŽåãèŠèŠçã«ããããæäœããããšã¯ã§ããªããªããŸãã
解決çãšããŠãããã©ãã®ä»ã®ããŒãžããæåã«ã°ãªããããã©ãã°ãããã®äžã§èŠçŽ ãäœæããã³ç·šéããŠããããã®ã°ãªãããç®çã®PanoramaItemã«æ»ãã ãã§ãã ããããããŒãžãç·šéãããšãã«ãåãã¹ããŒã ãæ©èœããŸã ã
ã¢ããªã±ãŒã·ã§ã³ã«ãã¹ãããŒã¿ãå ¥åãã
ãã®é ç®ã¯Windows Phoneã«ã¯çŽæ¥é©çšãããŸããããããã©ãã®2ããŒãžç®ã空ã®ãŸãŸã«ã§ããŸããã§ãã:)ã SketchFlowã¯ãã¢ããªã±ãŒã·ã§ã³ãã³ã³ãã³ãã§æºããããã«ãããŸããŸãªåœ¢åŒã§ããŒã¿ãçæããæ©èœããµããŒãããŠããŸãã
çæãããããŒã¿ã«ã¯ãããã¹ããæ°å€ãããŒã«ãç»åã®4çš®é¡ããããŸãã ããã¹ãããŒã¿ã®å Žåã次ã®ããªã»ããããããŸãïŒLorem IpsumïŒæå®ããããã©ã¡ãŒã¿ãŒãæã€ããã¹ãã®ã¿ïŒãååãæ¥ä»ãäœæãé»è©±çªå·ãªã©ã æ°å€ããŒã¿ã®å Žåã¯é·ãã瀺ãããç»åã®å Žåã¯ããããååŸãããã©ã«ããŒã瀺ãããŸãã
次ã®ããã«ãã¹ãããŒã¿ãäœæã§ããŸãã[ ããŒã¿ ]ã¿ãã§ã[ ããŒã¿ãµã³ãã«ã®äœæ ]ãã¿ã³ãã¯ãªãã¯ãã[ æ°ãããµã³ãã«ããŒã¿ãéžæ]ãã¯ãªãã¯ããŸã ã ãæ°ã¥ããããããŸããããããŒã¿ã¯XmlããååŸããããšããã¯ã©ã¹ã䜿çšããŠååŸããããšãã§ããŸãã
[ ãµã³ãã«å€ã®ç·šé ]ãã¿ã³ã䜿çšããŠãèŠçŽ ã®æ°ãå€æŽããèŠçŽ èªäœãç·šéã§ããŸãã
çæãããããŒã¿ã§ListBoxãäœæããã«ã¯ãå¿ èŠãªã³ã¬ã¯ã·ã§ã³ã[ ããŒã¿ ]ã¿ããããããã¿ã€ãã«ãã©ãã°ã¢ã³ãããããããã ãã§ãã 次ã«ãListBoxItemTemplateãã³ãã¬ãŒããç·šéããŠããªã¹ãã«å¿ èŠãªå€èŠ³ãäžããããšãã§ããŸã ã çæãããããŒã¿ãå¥ã®å Žæã§äœ¿çšããå Žåã¯ã ãã€ã³ãã£ã³ã°ã¡ã«ããºã ã䜿çšããå¿ èŠããããŸãã
ãã®äŸã§ã¯ãæ°ããã°ãªããã« ListBoxãäœæãããã®ã°ãªããã2çªç®ã®PanoramaItemã«ãã©ãã°ããŠæ»ããŸããã ãããã£ãŠãããã©ãã®2ããŒãžç®ã®ã³ã³ãã³ããåé¡ãªãç·šéããããšãã§ããŸããã
ãããã«
ãã®èšäºã®äžéšãšããŠã SketchFlowã䜿çšããŠWindows Phoneçšã®ã¢ããªã±ãŒã·ã§ã³ããããã¿ã€ãã³ã°ãããã¹ãŠã®æ©èœãæ€èšããããšããŸãã ã
SkyDriveã®èšäºããäŸãããŠã³ããŒãããŠãã ããã
詳现ã«ã€ããŠã¯ã次ã®ãªã³ã¯ã䜿çšã§ããŸãã
- 5圹ç«ã€Windows Phone Mango SketchFlowãã¥ãŒããªã¢ã«
- ãã¬ã³ã3ãšã¹ã±ãããããŒïŒãããã¿ã€ãã¢ããªã±ãŒã·ã§ã³ ïŒã¹ããŒã«ãŒ-女ã®åïŒ
- ãšã¯ã¹ãã¬ãã·ã§ã³ã¹ã±ãããããŒã«ããSilverlightã¢ããªã±ãŒã·ã§ã³ã®ãããã¿ã€ãã³ã°ïŒããŒã2ã
Windows Phoneã®SketchFlowãã³ãã¬ãŒãããåç¥ã§ããããªãŒã¹ãã©ãªã¢ã§ãäŒãã§ããããšã楜ãã¿ã«ããŠããŸãã