public PseudoVisualAssignment(IVisualElement toVisual, ContentAppendType appendType, IStyleRule rule, IVisualBootstrapper visualBootstrapper, IVisualLineage visualLineage, BuildAssignments assignmentsBuilder) { Visual = toVisual; _appendType = appendType; ILabel applyTo; switch (appendType) { case ContentAppendType.Before: if (!(toVisual.BeforeLabel is { } beforeLabel)) { applyTo = visualBootstrapper.Instantiate <Label>(); toVisual.BeforeLabel = applyTo; } else { applyTo = beforeLabel; } break;
public Boolean TryGetContentAppendType(out ContentAppendType appendType) { foreach (var selector in _selectors) { if (selector.TryGetContentAppendType(out appendType)) { return(true); } } appendType = ContentAppendType.Invalid; return(false); }
public ContentAppenderSelector(IStyleSelector typeSelector, ContentAppendType appendType) { AppendType = appendType; TypeSelector = typeSelector; }
public Boolean TryGetContentAppendType(out ContentAppendType appendType) { appendType = AppendType; return(true); }