FlyoutArrow/FlyoutArrow/FlyoutArrowPresenter.cs
/// <summary>
/// Initialize the controls when the template is applied
/// </summary>
Initialize the controls when the template is applied
Initialize the controls when the template is applied
protected override void OnApplyTemplate()
        {
            if (_controlCanvas != null)
            {
                _controlCanvas.LayoutUpdated -= OnLayoutUpdated;
            }
            _controlCanvas = GetTemplateChild("ControlCanvas") as Canvas;
            if (_controlCanvas != null)
            {
                _controlCanvas.LayoutUpdated += OnLayoutUpdated;
            }
            _content = GetTemplateChild("Content") as ContentPresenter;
            _arrow = GetTemplateChild("Arrow") as Polygon;
            _arrowOutlineLeft = GetTemplateChild("ArrowOutlineLeft") as Line;
            _arrowOutlineRight = GetTemplateChild("ArrowOutlineRight") as Line;
        }
protected override void OnApplyTemplate ( ) { if ( _controlCanvas != null ) { _controlCanvas . LayoutUpdated -= OnLayoutUpdated ; } _controlCanvas = GetTemplateChild ( " " ) as Canvas ; if ( _controlCanvas != null ) { _controlCanvas . LayoutUpdated += OnLayoutUpdated ; } _content = GetTemplateChild ( " " ) as ContentPresenter ; _arrow = GetTemplateChild ( " " ) as Polygon ; _arrowOutlineLeft = GetTemplateChild ( " " ) as Line ; _arrowOutlineRight = GetTemplateChild ( " " ) as Line ; }
Initialize the controls when the template is applied
Initialize the controls when the template is applied