Ejemplo n.º 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.");
     }
 }
Ejemplo n.º 2
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.");
     }
 }