public ExpandingObjectsOptionsWindow(ExpandingObjects e_o) { InitializeComponent(); this.SizeToContent = System.Windows.SizeToContent.WidthAndHeight; this.e_o = e_o; this.Topmost = true; ColorPicker.UsingAlphaChannel = true; ColorPicker.DisplayColorAndName = true; ColorPicker.SelectedColor = Colors.White; Binding ColorBinding = new Binding("Color"); ColorBinding.Source = this.e_o; ColorBinding.Mode = BindingMode.TwoWay; ColorPicker.SetBinding(Xceed.Wpf.Toolkit.ColorPicker.SelectedColorProperty, ColorBinding); Binding AmountBinding = new Binding("Amount"); AmountBinding.Source = this.e_o; AmountBinding.Mode = BindingMode.TwoWay; AmountSlider.SetBinding(Slider.ValueProperty, AmountBinding); Binding ObjectBinding = new Binding("Object"); ObjectBinding.Source = this.e_o; ObjectBinding.Mode = BindingMode.TwoWay; Selected_Objects.SetBinding(ComboBox.SelectedValueProperty, ObjectBinding); }
/// <summary> /// The MovingTextOptionsWindow nees a <see cref="RgbLibrary.MovingText"/> object. /// <para> /// <list type="bullet"> /// <listheader> /// <description>The user can change the properties:</description> /// </listheader> /// <item> /// <description> /// Color /// </description> /// </item> /// <item> /// <description> /// Text /// </description> /// </item> /// <item> /// <description> /// FontSize /// </description> /// </item> /// <item> /// <description> /// Position in x-achses /// </description> /// </item> /// <item> /// <description> /// Position in y-achses /// </description> /// <item> /// <description> /// Scroll Mode /// </description> /// </item> /// </item> /// </list> /// </para> /// </summary> /// <param name="movingText"></param> public MovingTextOptionsWindow(MovingText movingText) { InitializeComponent(); this.movingText = movingText; this.SizeToContent = System.Windows.SizeToContent.WidthAndHeight; this.Topmost = true; Binding ColorBinding = new Binding("ColorPalette"); ColorBinding.Source = this.movingText; ColorBinding.Mode = BindingMode.TwoWay; Palettes.SetBinding(ComboBox.TextProperty, ColorBinding); Binding TextBinding = new Binding("Text"); TextBinding.Source = this.movingText; TextBinding.Mode = BindingMode.TwoWay; TextBinding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged; Text.SetBinding(TextBox.TextProperty, TextBinding); Binding FontSizeBinding = new Binding("FontSize"); FontSizeBinding.Source = this.movingText; FontSizeBinding.Mode = BindingMode.TwoWay; FontSize.SetBinding(Slider.ValueProperty, FontSizeBinding); Binding ModeBinding = new Binding("Mode"); ModeBinding.Source = this.movingText; ModeBinding.Mode = BindingMode.TwoWay; Selected_Objects.SetBinding(ComboBox.SelectedValueProperty, ModeBinding); Binding PosYBinding = new Binding("PosY"); PosYBinding.Source = this.movingText; PosYBinding.Mode = BindingMode.TwoWay; PosY.SetBinding(Slider.ValueProperty, PosYBinding); Binding PosXBinding = new Binding("PosX"); PosXBinding.Source = this.movingText; PosXBinding.Mode = BindingMode.TwoWay; PosX.SetBinding(Slider.ValueProperty, PosXBinding); }
/// <summary> /// GradientColorOptionsWindow needs the <see cref="RgbLibrary.ColorGradient"/> object /// <list type="bullet"> /// <listheader> /// <description>The user can change the properties:</description> /// </listheader> /// <item> /// <description>GradientMode</description> /// </item> /// <item> /// <description>ColorPalette</description> /// </item> /// </list> /// </summary> /// <param name="colorgradient"></param> public GradientColorOptionsWindow(ColorGradient colorgradient) { InitializeComponent(); this.SizeToContent = System.Windows.SizeToContent.WidthAndHeight; this.colorgradient = colorgradient; Binding ObjectBinding = new Binding("GradientMode"); ObjectBinding.Source = this.colorgradient; ObjectBinding.Mode = BindingMode.TwoWay; Selected_Objects.SetBinding(ComboBox.TextProperty, ObjectBinding); Binding ColorPaletteBinding = new Binding("ColorPalette"); ColorPaletteBinding.Source = this.colorgradient; ColorPaletteBinding.Mode = BindingMode.TwoWay; Palettes.SetBinding(ComboBox.TextProperty, ColorPaletteBinding); }