Exemplo n.º 1
0
        /// <summary>
        /// When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call <see cref="M:System.Windows.Controls.Control.ApplyTemplate"/>. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
        /// </summary>
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            this.transitionLayer = this.GetTemplateChild("transitionLayer") as Canvas;

            this.itemsPanel = this.GetTemplateChild("itemsPanel") as SlideViewPanel;
            this.itemsPanel.Attach(this);

            this.UpdateSelectedItem();

            if (this.IsLoaded)
            {
                // Caliburn breaks the default sequence of events and Loaded comes BEFORE the OnApplyTemplate method
                this.ResetManipulationBehavior();
            }
        }
 internal void SetOwner(SlideViewPanel owner)
 {
     this.owner = owner;
 }