public void SetIsLearning(bool isLearning)
{
var radioButtons = LogicalTreeHelper.GetChildren(xGridOptions).OfType<RadioButton>().ToList();
if (isLearning)
{
xButtonLearn.IsEnabled = false;
radioButtons
.Where(rb => rb.GroupName == "Structure")
.ForAll(rb =>
{
rb.IsEnabled = false;
});
xTxtDirichletAlpha.IsEnabled = false;
xTxtParentLimit.IsEnabled = false;
}
else
{
xButtonLearn.IsEnabled = true;
radioButtons
.Where(rb => rb.GroupName == "Structure")
.ForAll(rb =>
{
rb.IsEnabled = true;
});
xTxtDirichletAlpha.IsEnabled = true;
xTxtParentLimit.IsEnabled = true;
}
}