Ejemplo n.º 1
0
        //激发路由事件,借用Click事件的激发方法

        protected void OnShootCut(string uri)
        {
            ObjectRoutedEventArgs <string> args = new ObjectRoutedEventArgs <string>(ShootCutRoutedEvent, this);

            args.Entity = uri;

            this.RaiseEvent(args);
        }
Ejemplo n.º 2
0
        //激发路由事件,借用Click事件的激发方法

        protected void OnDragDeltaChanged(ThumbType thumbType = ThumbType.Center)
        {
            ObjectRoutedEventArgs <ThumbType> args = new ObjectRoutedEventArgs <ThumbType>(DragDeltaChangedRoutedEvent, this);


            args.Entity = thumbType;

            this.RaiseEvent(args);
        }
Ejemplo n.º 3
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            this._center_thumb = Template.FindName("PART_CENTER_THUMB", this) as ThumbBar;

            this._center = Template.FindName("PART_CENTER", this) as Canvas;

            this._center_thumb.DragDeltaChanged += (l, k) =>
            {
                ObjectRoutedEventArgs <ThumbType> from = k as ObjectRoutedEventArgs <ThumbType>;

                this.RefreshData(from.Entity);
            };

            this._center_thumb.DragCompletedChanged += (l, k) =>
            {
                this.SetPosition();
            };
        }