protected virtual void OnSelectedValueChanged(GridLengthSelectionChangedEventArgs e) { if (SelectedValueChanged != null) { SelectedValueChanged(this, e); } }
protected virtual void OnDeleted(GridLengthSelectionChangedEventArgs e) { if (Deleted != null) { Deleted(this, e); } }
void EditorDeleted(object sender, GridLengthSelectionChangedEventArgs e) { if (e.Type == Orientation.Horizontal) { DeleteColumn(gridDisplay.Children.OfType <StackPanel>().First(item => (int)item.GetValue(Grid.ColumnProperty) == e.Cell)); } else { DeleteRow(gridDisplay.Children.OfType <StackPanel>().First(item => (int)item.GetValue(Grid.RowProperty) == e.Cell)); } }
void EditorSelectedValueChanged(object sender, GridLengthSelectionChangedEventArgs e) { UpdateUndoRedoState(); string value = "Invalid"; if (e.Value != null) { value = e.Value; } if (e.Type == Orientation.Horizontal) { colDefitions.Elements().ElementAt(e.Cell).SetAttributeValue("Width", value); } else { rowDefitions.Elements().ElementAt(e.Cell).SetAttributeValue("Height", value); } gridLengthInvalid = colDefitions.Elements().Any(col => (col.Attribute("Width") ?? new XAttribute("Width", "*")).Value == "Invalid") || rowDefitions.Elements().Any(row => (row.Attribute("Height") ?? new XAttribute("Height", "*")).Value == "Invalid"); }
void EditorSelectedValueChanged(object sender, GridLengthSelectionChangedEventArgs e) { UpdateUndoRedoState(); string value = "Invalid"; if (e.Value != null) value = e.Value; if (e.Type == Orientation.Horizontal) colDefitions.Elements().ElementAt(e.Cell).SetAttributeValue("Width", value); else rowDefitions.Elements().ElementAt(e.Cell).SetAttributeValue("Height", value); gridLengthInvalid = colDefitions.Elements().Any(col => (col.Attribute("Width") ?? new XAttribute("Width", "*")).Value == "Invalid") || rowDefitions.Elements().Any(row => (row.Attribute("Height") ?? new XAttribute("Height", "*")).Value == "Invalid"); }
void EditorDeleted(object sender, GridLengthSelectionChangedEventArgs e) { if (e.Type == Orientation.Horizontal) DeleteColumn(gridDisplay.Children.OfType<StackPanel>().First(item => (int)item.GetValue(Grid.ColumnProperty) == e.Cell)); else DeleteRow(gridDisplay.Children.OfType<StackPanel>().First(item => (int)item.GetValue(Grid.RowProperty) == e.Cell)); }