Beispiel #1
0
        protected override void OnApplyTemplate()
        {
            _frame     = base.GetTemplateChild("frame") as Panel;
            _panel     = base.GetTemplateChild("panel") as SliderViewPanel;
            _prevArrow = base.GetTemplateChild("prevArrow") as Button;
            _nextArrow = base.GetTemplateChild("nextArrow") as Button;
            _clip      = base.GetTemplateChild("clip") as RectangleGeometry;

            _frame.ManipulationDelta     += OnManipulationDelta;
            _frame.ManipulationCompleted += OnManipulationCompleted;
            _frame.ManipulationMode       = ManipulationModes.TranslateX | ManipulationModes.TranslateInertia | ManipulationModes.System;

            _prevArrow.Click += OnPrevArrowClick;
            _nextArrow.Click += OnNextArrowClick;

            base.OnApplyTemplate();
        }
Beispiel #2
0
        protected override void OnApplyTemplate()
        {
            _frame = base.GetTemplateChild("frame") as Panel;
            _panel = base.GetTemplateChild("panel") as SliderViewPanel;

            _arrows = base.GetTemplateChild("arrows") as Grid;
            _left = base.GetTemplateChild("left") as Button;
            _right = base.GetTemplateChild("right") as Button;

            _clip = base.GetTemplateChild("clip") as RectangleGeometry;

            _frame.ManipulationDelta += OnManipulationDelta;
            _frame.ManipulationCompleted += OnManipulationCompleted;
            _frame.ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.System;

            this.PointerEntered += OnPointerEntered;
            this.PointerExited += OnPointerExited;
            _left.Click += OnPrevArrowClick;
            _right.Click += OnNextArrowClick;

            base.OnApplyTemplate();
        }
Beispiel #3
0
        protected override void OnApplyTemplate()
        {
            _frame = base.GetTemplateChild("frame") as Panel;
            _panel = base.GetTemplateChild("panel") as SliderViewPanel;

            _arrows = base.GetTemplateChild("arrows") as Grid;
            _left   = base.GetTemplateChild("left") as Button;
            _right  = base.GetTemplateChild("right") as Button;

            _clip = base.GetTemplateChild("clip") as RectangleGeometry;

            _frame.ManipulationDelta     += OnManipulationDelta;
            _frame.ManipulationCompleted += OnManipulationCompleted;
            _frame.ManipulationMode       = ManipulationModes.TranslateX | ManipulationModes.System;

            this.PointerEntered += OnPointerEntered;
            this.PointerExited  += OnPointerExited;
            _left.Click         += OnPrevArrowClick;
            _right.Click        += OnNextArrowClick;

            base.OnApplyTemplate();
        }