Esempio n. 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.@this = ((ICSharpCode.SharpDevelop.Widgets.ColorPicker)(target));
                return;

            case 2:
                this.arrows = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.point = ((System.Windows.Controls.Grid)(target));
                return;
            }
            this._contentLoaded = true;
        }
		void ButtonClick(object sender, RoutedEventArgs e)
		{
			var control = new Widgets.ColorPicker() {
				Background = SystemColors.ControlBrush
			};
			Popup popup = new Popup() {
				Child = control,
				Placement = PlacementMode.Bottom,
				PlacementTarget = this,
				IsOpen = true,
				StaysOpen = false
			};
			
			control.SetBinding(
				Widgets.ColorPicker.ColorProperty,
				new Binding("Value") {
					Source = this,
					Mode = BindingMode.TwoWay
				}
			);
		}
Esempio n. 3
0
        void ButtonClick(object sender, RoutedEventArgs e)
        {
            var control = new Widgets.ColorPicker()
            {
                Background = SystemColors.ControlBrush
            };
            Popup popup = new Popup()
            {
                Child           = control,
                Placement       = PlacementMode.Bottom,
                PlacementTarget = this,
                IsOpen          = true,
                StaysOpen       = false
            };

            control.SetBinding(
                Widgets.ColorPicker.ColorProperty,
                new Binding("Value")
            {
                Source = this,
                Mode   = BindingMode.TwoWay
            }
                );
        }