Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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);
        }