30 lines
1.5 KiB
C#
30 lines
1.5 KiB
C#
using mbts.ui.controls;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
namespace mbts.spark {
|
|
internal partial class MiniOrderBookView : UserControl {
|
|
// IMPORTANT: these enums are stored as strings in the general-purpose GridColumnSettings proto, and are used to ID THE COLUMNS!
|
|
// Do NOT RENAME them! However, if you must, be sure to write an IShellWindowMigrationRule or something to account for backwards compatability.
|
|
public enum Columns { Security, Symbol, Time, LastChange, User, Account, Exchange, TimeInForce, OrderType, SubType, Side, Size, Price, Filled, AvgFilled, LastPrice, Status, LastMessage, SecurityKey, OrderKey, ParentKey, Cancel, EditableQty, EditablePrice, Attach }
|
|
public const string
|
|
SubTypeFilterTemplateKey = "SubTypeFilterTemplate",
|
|
ExpandCollapseToggleStyleKey = "ExpandCollapseToggleStyle",
|
|
RowStyleKey = "RowStyle",
|
|
RowTemplateKey = "RowTemplateKey",
|
|
CVRowStyleKey = "CVRowStyle",
|
|
CVRowTemplateKey = "CVRowTemplateKey";
|
|
|
|
public MiniOrderBookView(OrderBookVM vm) {
|
|
InitializeComponent();
|
|
DataContext = vm;
|
|
}
|
|
}
|
|
|
|
class MiniOrderBookRowView : DIYGrid.HighPerformanceRow<OrderBookRowVM, OrderBookGridView.ColumnKeys> {
|
|
public MiniOrderBookRowView() : base() {
|
|
FocusManager.SetIsFocusScope(this, true);
|
|
KeyboardNavigation.SetTabNavigation(this, KeyboardNavigationMode.Cycle);
|
|
}
|
|
}
|
|
} |