public void Test2( ) { PresentationTraceSources.Refresh(); var x1 = new NLogTraceListener { ForceLogLevel = LogLevel.Debug }; PresentationTraceSources.MarkupSource.Listeners.Add(x1); PresentationTraceSources.MarkupSource.Switch.Level = SourceLevels.All; var x = new ProxyUtils(WriteOut, ProxyUtilsBase.CreateInterceptor(WriteOut)); var @out = x.TransformXaml2(@"files/test.xaml"); Logger.Debug("{out}", @out); }
public void Test1() { var p = new ProxyUtils(WriteOut, ProxyUtilsBase.CreateInterceptor(WriteOut)); var xamlSchemaContext = p.CreateXamlSchemaContext(); Logger.Info("{schemaContext}", xamlSchemaContext); foreach (var ns in xamlSchemaContext.GetAllXamlNamespaces()) { var allXamlTypes = xamlSchemaContext.GetAllXamlTypes(ns); Logger.Debug("{numtypes} {namespace}", allXamlTypes.Count, ns); // continue ; foreach (var t in allXamlTypes) { if (t.IsMarkupExtension) { Logger.Debug("{t}", t); } } } }