public async Task SetReadOnlyBrushInitialValueAsync(IObjectEditor editor, CommonBrush brush) { if (this.readOnlyBrushSet) { return; } await editor.SetValueAsync(this.readOnlyBrushPropertyInfo, new ValueInfo <CommonBrush> { Value = brush }); this.readOnlyBrushSet = true; }
private NSView MakeValueView(Resource resource, NSTableView tableView) { var view = (NSView)tableView.MakeView(valueIdentifier, this); if (view == null) { view = GetValueView(resource.RepresentationType); } CommonBrush commonBrush = BrushPropertyViewModel.GetCommonBrushForResource(resource); if (commonBrush != null && view is CommonBrushView commonBrushView) { commonBrushView.Brush = commonBrush; } return(view); }