Exemplo n.º 1
0
		private void InitializeNewServices()
		{
			this.newDraggingService = new MyDragging(this.diagram);
			Binding binding = new Binding("IsOn");
			binding.Source = this.newDraggingService;
			binding.Mode = BindingMode.TwoWay;
			this.toggleDrag.SetBinding(RadToggleButton.IsCheckedProperty, binding);
			binding = new Binding("IsRestrictedToBounds");
			binding.Source = this.newDraggingService;
			binding.Mode = BindingMode.TwoWay;
			this.IsRestrictedToBounds.SetBinding(RadToggleButton.IsCheckedProperty, binding);
			binding = new Binding("UseRotaitonBounds");
			binding.Source = this.newDraggingService;
			binding.Mode = BindingMode.TwoWay;
			this.useRotaitonBounds.SetBinding(RadToggleButton.IsCheckedProperty, binding);

			this.newRotationService = new MyRotation(this.diagram) { RotationStep = 45 };
			binding = new Binding("RotationStep");
			binding.Source = this.newRotationService;
			binding.Mode = BindingMode.TwoWay;
			this.rotationStep.SetBinding(TextBox.TextProperty, binding);

			this.newResizingService = new MyResizing(this.diagram);
			binding = new Binding("CanResizeWidth");
			binding.Source = this.newResizingService;
			binding.Mode = BindingMode.TwoWay;
			this.resizeWidth.SetBinding(RadToggleButton.IsCheckedProperty, binding);
			binding = new Binding("CanResizeHeight");
			binding.Source = this.newResizingService;
			binding.Mode = BindingMode.TwoWay;
			this.resizeHeight.SetBinding(RadToggleButton.IsCheckedProperty, binding);
		}
Exemplo n.º 2
0
        private void InitializeNewServices()
        {
            this.newDraggingService = new MyDragging(this.diagram);
            Binding binding = new Binding("IsOn");

            binding.Source = this.newDraggingService;
            binding.Mode   = BindingMode.TwoWay;
            this.toggleDrag.SetBinding(RadToggleButton.IsCheckedProperty, binding);
            binding        = new Binding("IsRestrictedToBounds");
            binding.Source = this.newDraggingService;
            binding.Mode   = BindingMode.TwoWay;
            this.IsRestrictedToBounds.SetBinding(RadToggleButton.IsCheckedProperty, binding);
            binding        = new Binding("UseRotaitonBounds");
            binding.Source = this.newDraggingService;
            binding.Mode   = BindingMode.TwoWay;
            this.useRotaitonBounds.SetBinding(RadToggleButton.IsCheckedProperty, binding);

            this.newRotationService = new MyRotation(this.diagram)
            {
                RotationStep = 45
            };
            binding        = new Binding("RotationStep");
            binding.Source = this.newRotationService;
            binding.Mode   = BindingMode.TwoWay;
            this.rotationStep.SetBinding(TextBox.TextProperty, binding);

            this.newResizingService = new MyResizing(this.diagram);
            binding        = new Binding("CanResizeWidth");
            binding.Source = this.newResizingService;
            binding.Mode   = BindingMode.TwoWay;
            this.resizeWidth.SetBinding(RadToggleButton.IsCheckedProperty, binding);
            binding        = new Binding("CanResizeHeight");
            binding.Source = this.newResizingService;
            binding.Mode   = BindingMode.TwoWay;
            this.resizeHeight.SetBinding(RadToggleButton.IsCheckedProperty, binding);
        }