{
//Add the style to the current project
string stylePath = @"C:\MyStyles\MyStyle.stylx";
var project = Project.Current;
await QueuedTask.Run(() => StyleHelper.AddStyle(project, stylePath));
StyleProjectItem styleToCheck = Project.Current.GetItems<StyleProjectItem>().First(x => x.Path == stylePath);
//returns true if style is read-only
bool isReadOnly = styleToCheck.IsReadOnly;
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)