public void AddBulletInBody(string text) { Ellipse ellipse1 = new Ellipse(); ellipse1.Width = 9.0; ellipse1.Height = 9.0; ellipse1.VerticalAlignment = VerticalAlignment.Center; Ellipse ellipse2 = ellipse1; BlueStacksUIBinding.BindColor((DependencyObject)ellipse2, Shape.FillProperty, "ContextMenuItemForegroundDimColor"); TextBlock textBlock1 = new TextBlock(); textBlock1.FontSize = 18.0; textBlock1.MaxWidth = 300.0; textBlock1.FontWeight = FontWeights.Regular; TextBlock textBlock2 = textBlock1; BlueStacksUIBinding.BindColor((DependencyObject)textBlock2, Control.ForegroundProperty, "ContextMenuItemForegroundDimColor"); textBlock2.TextWrapping = TextWrapping.Wrap; textBlock2.Text = text; textBlock2.HorizontalAlignment = HorizontalAlignment.Left; textBlock2.VerticalAlignment = VerticalAlignment.Center; textBlock2.Margin = new Thickness(0.0, 0.0, 0.0, 10.0); BulletDecorator bulletDecorator = new BulletDecorator(); bulletDecorator.Bullet = (UIElement)ellipse2; bulletDecorator.Child = (UIElement)textBlock2; this.mBodyTextStackPanel.Children.Add((UIElement)bulletDecorator); }
private void SetBackground() { if (this.IsSelected) { BlueStacksUIBinding.BindColor((DependencyObject)this, Control.BackgroundProperty, "SettingsWindowTabMenuItemSelectedBackground"); } else { this.Button_MouseEvent((object)null, (MouseEventArgs)null); } }
private void SetForeGround() { if (this.isSelected) { BlueStacksUIBinding.BindColor((DependencyObject)this, Control.ForegroundProperty, "SettingsWindowTabMenuItemSelectedForeground"); } else { BlueStacksUIBinding.BindColor((DependencyObject)this, Control.ForegroundProperty, "SettingsWindowTabMenuItemForeground"); } }
private void Button_MouseEvent(object sender, MouseEventArgs e) { if (this.IsSelected) { return; } if (this.IsMouseOver) { BlueStacksUIBinding.BindColor((DependencyObject)this, Control.BackgroundProperty, "SettingsWindowTabMenuItemHoverBackground"); } else { BlueStacksUIBinding.BindColor((DependencyObject)this, Control.BackgroundProperty, "SettingsWindowTabMenuItemBackground"); } }