public void OnAddPositionCommand(object sender, EventArgs e) { NadexPosition newPosition = new NadexPosition { DisplayName = "New position..", Expiration = DateTime.Now }; Positions.Add(newPosition); SelectedItem = newPosition; SavePositionsToXml(); }
public void OnRemovePositionCommand(object sender, EventArgs e) { // this should never be possible if (SelectedItem == null) { return; } Positions.Remove(SelectedItem); SelectedItem = null; SavePositionsToXml(); }
public void OnRemovePositionCommand(object sender, EventArgs e) { // this should never be possible if (SelectedItem == null) return; Positions.Remove(SelectedItem); SelectedItem = null; SavePositionsToXml(); }