in Tools/Apps/Microsoft.PowerApps.ThemeEditor/ViewModel/MainViewModel.cs [585:614]
public void AddMissingProperties()
{
if (this._defaultTheme == null)
{
string themeFileName = Path.Combine(Directory.GetCurrentDirectory(), MainViewModel.ThemeFileSchema);
_dataService.GetData(themeFileName,
(item, error) =>
{
if (error != null)
{
//TODO: Report error here
return;
}
this._defaultTheme = item;
});
}
foreach (Style style in this._defaultTheme.styles)
{
Style themeStyle = this.StyleModel.styles.FirstOrDefault(s => s.name == style.name);
if (themeStyle != null)
{
foreach (Propertyvaluesmap property in style.propertyValuesMap)
{
if (!themeStyle.propertyValuesMap.Any(s => s.property == property.property))
themeStyle.propertyValuesMap.Add(new Propertyvaluesmap { property = property.property, value = "Default" });
}
}
}
}