private XmlElementSelector CreateSelector(ElementSelector selector) { XmlSelectorBase xmlSelectorBase = (XmlSelectorBase)null; WrapSelector wrapSelector = selector as WrapSelector; if (wrapSelector != null) { TypeSelector internalSelector1 = wrapSelector.InternalSelector as TypeSelector; if (internalSelector1 != null) { return((XmlElementSelector) new XmlTypeSelector(XmlTheme.SerializeType(internalSelector1.ElementType))); } ClassSelector internalSelector2 = wrapSelector.InternalSelector as ClassSelector; if (internalSelector2 != null) { return((XmlElementSelector) new XmlClassSelector(internalSelector2.ElementClass)); } } if (selector.Type == ElementSelectorTypes.VisualStateSelector) { xmlSelectorBase = (XmlSelectorBase) new XmlVisualStateSelector(selector.Value); } else if (selector.Type == ElementSelectorTypes.TypeSelector) { xmlSelectorBase = (XmlSelectorBase) new XmlTypeSelector(selector.Value); } else if (selector.Type == ElementSelectorTypes.ClassSelector) { xmlSelectorBase = (XmlSelectorBase) new XmlClassSelector(selector.Value); } if (selector.ChildSelector != null) { xmlSelectorBase.ChildSelector = this.CreateSelector(selector.ChildSelector); } return((XmlElementSelector)xmlSelectorBase); }
protected override XmlElementSelector CreateSerializableInstance() { return(new XmlTypeSelector(XmlTheme.SerializeType(this.ElementType))); }
public XmlAnimationStep(object actualStep) { this.StepType = XmlTheme.SerializeType(actualStep.GetType()); this.Value = XmlAnimatedPropertySetting.ConvertValueToString(actualStep); }