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."); } }
private void findZapDecorator() { if (this.Template != null) { ZapDecorator temp = this.Template.FindName(PART_ZapDecorator, this) as ZapDecorator; if (_zapDecorator != temp) { _zapDecorator = temp; if (_zapDecorator != null) { _zapDecorator.Child = _zapPanel; Binding binding = new Binding("CurrentItemIndex"); binding.Source = this; _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."); } }