protected override void OnApplyTemplate() { base.OnApplyTemplate(); GripBar = GetTemplateChild("GripBarElement") as UIElement; if (ParentItem != null) { ParentItem.OnHeaderPartLoaded(); } UpdateTileStates(); }