private static void PressedColorPropertyChange(DependencyObject obj, DependencyPropertyChangedEventArgs e) { ButFlat c = obj as ButFlat; Color v = (Color)e.NewValue; c.Resources["pressedColor"] = v; c.PressedColor = v; }
private static void TextColorPropertyChange(DependencyObject obj, DependencyPropertyChangedEventArgs e) { ButFlat c = obj as ButFlat; Color v = (Color)e.NewValue; c.label.Foreground = new SolidColorBrush(v); c.TextColor = v; }
private static void FontSizePropertyChange(DependencyObject obj, DependencyPropertyChangedEventArgs e) { ButFlat c = obj as ButFlat; int v = (int)e.NewValue; c.label.FontSize = v; c.FontSizez = v; }
private static void TextPropertyChange(DependencyObject obj, DependencyPropertyChangedEventArgs e) { ButFlat c = obj as ButFlat; string v = (string)e.NewValue; c.label.Content = v; c.Text = v; }
private static void NormalColorPropertyChange(DependencyObject obj, DependencyPropertyChangedEventArgs e) { ButFlat c = obj as ButFlat; Color v = (Color)e.NewValue; c.Resources["normalColor"] = v; c.rectangle.Fill = new SolidColorBrush(v); c.NormalColor = v; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.userControl = ((GameHaker.ButFlat)(target)); #line 7 "..\..\..\..\Resource\control\ButFlat.xaml" this.userControl.MouseEnter += new System.Windows.Input.MouseEventHandler(this.userControl_MouseEnter); #line default #line hidden #line 7 "..\..\..\..\Resource\control\ButFlat.xaml" this.userControl.MouseLeave += new System.Windows.Input.MouseEventHandler(this.userControl_MouseLeave); #line default #line hidden #line 7 "..\..\..\..\Resource\control\ButFlat.xaml" this.userControl.PreviewMouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.userControl_PreviewMouseLeftButtonDown); #line default #line hidden #line 7 "..\..\..\..\Resource\control\ButFlat.xaml" this.userControl.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.userControl_MouseEnter); #line default #line hidden return; case 2: this.rectangle = ((System.Windows.Shapes.Rectangle)(target)); return; case 3: this.label = ((System.Windows.Controls.Label)(target)); return; case 4: this.viewbox = ((System.Windows.Controls.Viewbox)(target)); return; } this._contentLoaded = true; }