Настройки пока:
[*] У меня есть wpf grid с текстовым автоматом SET в COL и ROW.
Существует набор enum для выбора элементов. /> < /ul>
Примечания: < /p>
Ninjatrader больше не использует формы и теперь использует wpf. < /li>
Я не хочу интерфейс Web /XML или HTML. Just C# используется в сетке. src = "https://i.sstatic.net/v0u32h2t.png"/>
Пример кода:
#region Enums
namespace Profit_Bot_Enums
{
public enum MySystems
{
[Display(Name = "NotSet")]
NotSet = 0,
[Display(Name = "PrevBarHbuy")]
PrevBarHbuy = 1,
[Display(Name = "OldSystem")]
OldSystem = 2
};
}
#endregion
#region System-r3
this.SystemLabel = new Label
{
Content = string.Format("System Strategy: ", 0),
Height = 20.0,
Margin = new Thickness(4.0, 0.0, 4.0, 0.0),
Padding = new Thickness(0.0, 2.0, 0.0, 2.0),
HorizontalAlignment = HorizontalAlignment.Center
};
this.SystemLabel.Foreground = Brushes.White;
this.SystemLabel.Background = Brushes.Transparent;
this.SystemLabel.BorderBrush = Brushes.Transparent;
this.SystemLabel.HorizontalAlignment = HorizontalAlignment.Center;
Grid.SetColumnSpan(this.SystemLabel, 1);
Grid.SetRow(this.SystemLabel, 3);
grid5.Children.Add(this.SystemLabel);
string formatSys = string.Empty;
#endregion
#region button-r3_text
this.systemsLabelVal = new TextBox
{
Text = string.Format(this.systemsValue.ToString(), 0),
Height = 20.0,
Width = 60.0,
FontSize = 10.0,
HorizontalAlignment = HorizontalAlignment.Center
};
this.systemsLabelVal.Foreground = Brushes.White;
this.systemsLabelVal.Background = Brushes.Transparent;
this.systemsLabelVal.BorderBrush = Brushes.Transparent;
this.systemsLabelVal.HorizontalAlignment = HorizontalAlignment.Right;
this.systemsLabelVal.VerticalAlignment = VerticalAlignment.Center;
this.systemsLabelVal.TextAlignment = TextAlignment.Center;
Grid.SetColumnSpan(this.systemsLabelVal, 3);
Grid.SetRow(this.systemsLabelVal, 3);
this.systemsLabelVal.PreviewKeyDown += this.TextBox_PreviewKeyDown;
grid5.Children.Add(this.systemsLabelVal);
#endregion
#region Systems button-r4
this.Systemsbtn = new Button
{
Content = string.Format("None", 1),
Name = "None",
Height = 30.0,
Margin = new Thickness(4.0, 4.0, 4.0, 0.0),
Padding = new Thickness(4.0, 0.0, 4.0, 0.0),
Style = style
};
this.Systemsbtn.Background = Brushes.Gray;
this.Systemsbtn.BorderBrush = Brushes.DimGray;
this.Systemsbtn.Foreground = Brushes.White;
this.Systemsbtn.Click += this.Systemsbtn_Click;
Grid.SetColumnSpan(this.Systemsbtn, 3);
Grid.SetRow(this.Systemsbtn, 4);
grid5.Children.Add(this.Systemsbtn);
#endregion
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
}
private void Systemsbtn_Click(object sender, RoutedEventArgs e)
{
}
< /code>
Спасибо за любые идеи о реализациях! < /p>
Я попытался установить значения enum в разных местах в коде. Мне еще предстоит найти правильный способ реализации.
Подробнее здесь: https://stackoverflow.com/questions/797 ... -c-with-wp
Ninjatrader Dropl Down Down, чтобы заполнить значение текстового поля или кнопки текстового значения (C# с доступным WPF ⇐ C#
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Как изменить размер HTML Select Select Dopl Down Down Down с помощью CSS или jQuery
Anonymous » » в форуме Html - 0 Ответы
- 2 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Как изменить размер HTML Select Select Dopl Down Down Down с помощью CSS или jQuery
Anonymous » » в форуме Jquery - 0 Ответы
- 3 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Как изменить размер HTML Select Select Dopl Down Down Down с помощью CSS или jQuery
Anonymous » » в форуме CSS - 0 Ответы
- 3 Просмотры
-
Последнее сообщение Anonymous
-