예제 #1
0
 private void findZapDecorator()
 {
     if (this.Template != null)
     {
         ZapDecorator temp = this.Template.FindName(PART_ZapDecorator, this) as ZapDecorator;
         if (m_zapDecorator != temp)
         {
             m_zapDecorator = temp;
             if (m_zapDecorator != null)
             {
                 Binding binding = new Binding("CurrentItemIndex");
                 binding.Source = this;
                 m_zapDecorator.SetBinding(ZapDecorator.TargetIndexProperty, binding);
             }
         }
         else
         {
             Debug.WriteLine("No element with name '" + PART_ZapDecorator + "' in the template.");
         }
     }
     else
     {
         Debug.WriteLine("No template defined for ZapScroller.");
     }
 }
예제 #2
0
파일: ZapScroller.cs 프로젝트: edealbag/bot
 private void findZapDecorator()
 {
     if (this.Template != null)
     {
         ZapDecorator temp = this.Template.FindName(PART_ZapDecorator, this) as ZapDecorator;
         if (m_zapDecorator != temp)
         {
             m_zapDecorator = temp;
             if (m_zapDecorator != null)
             {
                 Binding binding = new Binding("CurrentItemIndex");
                 binding.Source = this;
                 m_zapDecorator.SetBinding(ZapDecorator.TargetIndexProperty, binding);
             }
         }
         else
         {
             Debug.WriteLine("No element with name '" + PART_ZapDecorator + "' in the template.");
         }
     }
     else
     {
         Debug.WriteLine("No template defined for ZapScroller.");
     }
 }