public ISelectionGroup <T> GetSelectionGroup(string groupName) { ISelectionGroup <T> group; if (!groups.TryGetValue(groupName, out group)) { group = new SelectionGroup <T>(); groups.Add(groupName, group); } return(group); }
private ISelectionGroup <RadioButton> GetDefaultGroup() { if (LogicalParent == null) { return(null); } ISelectionGroup <RadioButton> group = (ISelectionGroup <RadioButton>)LogicalParent.GetValue(SelectionGroupProperty); if (group == null) { group = new SelectionGroup <RadioButton>(); LogicalParent.SetValue(SelectionGroupProperty, group); } return(group); }