private DataTemplate SelectValueTemplate(Type type, AudioSourceSettingVM setting) { Logger.Debug("Selecting value template for setting {name}, type {type}", setting.Name, type); if (type == typeof(string)) { return(setting.Sensitive ? SensitiveTemplate : StringTemplate); } if (type == typeof(bool)) { return(BoolTemplate); } if (type == typeof(int)) { return(IntTemplate); } if (type == typeof(uint)) { return(UIntTemplate); } throw new ArgumentException("No matching value template for `{type}`"); }
private DataTemplate SelectValueTemplate(Type type, AudioSourceSettingVM setting) { if (type == typeof(string)) { return(setting.Sensitive ? SensitiveTemplate : StringTemplate); } if (type == typeof(bool)) { return(BoolTemplate); } if (type == typeof(int)) { return(IntTemplate); } if (type == typeof(uint)) { return(UIntTemplate); } throw new ArgumentException($"No matching value template for `{type}`"); }
private DataTemplate SelectKeyTemplate(AudioSourceSettingVM setting) { return(setting.Sensitive ? SensitiveLabelTemplate : NormalLabelTemplate); }