Flyout performance improvement

Moved all GetTemplateChild to OnApplyTemplate and stored the values in variables.