Устранение проблемы в ответе @adneal: если для setErrorEnabled не задано значение true, mErrorView будет иметь значение null, и если вы установите значение false в любой момент, шрифт изменится на значение по умолчанию. чтобы исправить это:
в вашем пользовательском переопределении TextInputLayout setErrorEnabled
@Override
public void setErrorEnabled(boolean enabled) {
super.setErrorEnabled(enabled);
if (enabled) {
try {
Field cthf = TextInputLayout.class.getDeclaredField("mErrorView");
cthf.setAccessible(true);
TextView error = (TextView) cthf.get(this);
if (error != null)
error.setTypeface(tf);
} catch (Exception e) {
}
}
}
Ваш m_VariableList реализует INotifyCollectionChanged ? Если это не ObservableCollection, то изменения его содержимого не будут автоматически отражаться в пользовательском интерфейсе.
The problem is not in the XAML that you have provided. I used the same XAML successfully in a test application; however, I was able to replicate the issue you are experiencing by re-instantiating the m_VariableList variable.
When the m_VariableList is given a new instance, or pointed to a new object, it is not reflected in the ListBox because the control has its own reference to the data. This may not be the cause of your problem, but I'd recommend looking over your code-behind to ensure that the variable is not getting re-instantiated.