private void ApplyPlatformFeatures()
        {
            var body = GetTemplateChild(HorizontalTemplateName) as Grid;

            if (body != null)
            {
                _monitor           = new MovementMonitor();
                _monitor.Movement += _monitor_Movement;
                _monitor.MonitorControl(body);
            }
        }
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            BackgroundRectangle = GetTemplateChild(BackgroundRectangleName) as Rectangle;
            ProgressRectangle   = GetTemplateChild(ProgressRectangleName) as Rectangle;
            var body = GetTemplateChild(BodyName) as Grid;

            this.SliderThumb = GetTemplateChild(ThumbName) as ContentPresenter;
            this.tbValue     = GetTemplateChild(ValueDisplayName) as TextBlock;
            if (body != null)
            {
                _monitor           = new MovementMonitor();
                _monitor.Movement += _monitor_Movement;
                _monitor.MonitorControl(body);
            }

            // stuff isn't set enough but if this isn't done, there will an initial flash
            AdjustLayout();
        }