예제 #1
0
        protected override void OnApplyTemplate()
        {
            _frame = base.GetTemplateChild("frame") as Panel;

            _headerContainer              = base.GetTemplateChild("headerContainer") as Panel;
            _header                       = base.GetTemplateChild("header") as PivoramaPanel;
            _header.SelectedIndexChanged += OnSelectedIndexChanged;

            _tabsContainer              = base.GetTemplateChild("tabsContainer") as Panel;
            _tabs                       = base.GetTemplateChild("tabs") as PivoramaTabs;
            _tabs.SelectedIndexChanged += OnSelectedIndexChanged;

            _panelContainer = base.GetTemplateChild("panelContainer") as Panel;
            _panel          = base.GetTemplateChild("panel") as PivoramaPanel;

            _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.TranslateInertia | ManipulationModes.System;
            _frame.PointerWheelChanged   += OnPointerWheelChanged;

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

            _frame.PointerMoved   += OnPointerMoved;
            _left.Click           += OnLeftClick;
            _right.Click          += OnRightClick;
            _left.PointerEntered  += OnArrowPointerEntered;
            _left.PointerExited   += OnArrowPointerExited;
            _right.PointerEntered += OnArrowPointerEntered;
            _right.PointerExited  += OnArrowPointerExited;

            _isInitialized = true;

            this.ItemWidthEx = this.ItemWidth;

            this.SizeChanged += OnSizeChanged;

            base.OnApplyTemplate();
        }
예제 #2
0
파일: Pivorama.cs 프로젝트: ridomin/waslibs
        protected override void OnApplyTemplate()
        {
            _frame = base.GetTemplateChild("frame") as Panel;

            _headerContainer = base.GetTemplateChild("headerContainer") as Panel;
            _header = base.GetTemplateChild("header") as PivoramaPanel;
            _header.SelectedIndexChanged += OnSelectedIndexChanged;

            _tabsContainer = base.GetTemplateChild("tabsContainer") as Panel;
            _tabs = base.GetTemplateChild("tabs") as PivoramaTabs;
            _tabs.SelectedIndexChanged += OnSelectedIndexChanged;

            _panelContainer = base.GetTemplateChild("panelContainer") as Panel;
            _panel = base.GetTemplateChild("panel") as PivoramaPanel;

            _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.TranslateInertia | ManipulationModes.System;
            _frame.PointerWheelChanged += OnPointerWheelChanged;

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

            _frame.PointerMoved += OnPointerMoved;
            _left.Click += OnLeftClick;
            _right.Click += OnRightClick;
            _left.PointerEntered += OnArrowPointerEntered;
            _left.PointerExited += OnArrowPointerExited;
            _right.PointerEntered += OnArrowPointerEntered;
            _right.PointerExited += OnArrowPointerExited;

            _isInitialized = true;

            this.ItemWidthEx = this.ItemWidth;

            this.SizeChanged += OnSizeChanged;

            base.OnApplyTemplate();
        }
예제 #3
0
        protected override void OnApplyTemplate()
        {
            _frame = base.GetTemplateChild("frame") as Panel;

            _headerContainer              = base.GetTemplateChild("headerContainer") as Panel;
            _header                       = base.GetTemplateChild("header") as PivoramaPanel;
            _header.SelectedIndexChanged += OnSelectedIndexChanged;

            _tabsContainer              = base.GetTemplateChild("tabsContainer") as Panel;
            _tabs                       = base.GetTemplateChild("tabs") as PivoramaTabs;
            _tabs.SelectedIndexChanged += OnSelectedIndexChanged;

            _panelContainer = base.GetTemplateChild("panelContainer") as Panel;
            _panel          = base.GetTemplateChild("panel") as PivoramaPanel;

            _scrollViewer = base.GetTemplateChild("scrollViewer") as ScrollViewer;

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

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

            _panelContainer.ManipulationDelta     += OnManipulationDelta;
            _panelContainer.ManipulationCompleted += OnManipulationCompleted;
            _panelContainer.ManipulationMode       = ManipulationModes.TranslateX | ManipulationModes.TranslateInertia | ManipulationModes.System;
            _panelContainer.PointerWheelChanged   += OnPointerWheelChanged;

            _isInitialized = true;

            this.ItemWidthEx = this.ItemWidth;

            this.SizeChanged += OnSizeChanged;

            base.OnApplyTemplate();
        }