private void NamespaceSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count == 0)
            {
                return;
            }

            _selectedNs = e.AddedItems[0] as NsInfo;
            if (_selectedNs == null)
            {
                return;
            }

            nsGridView.ItemsSource = _selectedNs.ChildNamespaces;
        }
        private void ChildNamespaceSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count == 0)
            {
                return;
            }

            _selectedNs = e.AddedItems[0] as NsInfo;
            if (_selectedNs == null)
            {
                return;
            }

            Frame.Navigate(typeof(ClassListPage), _selectedNs.Name);
        }
Ejemplo n.º 3
0
        private void WritePendingNamespaceDeclarations(string uri)
        {
            NsInfo nsInfo = NamespaceResolver.GetNsInfo(_currentDocument);

            if (nsInfo == null)
            {
                return;
            }

            foreach (var ns in nsInfo.Namespaces)
            {
                if (ns.Value == uri)
                {
                    continue;
                }
                _xmlTextWriter.WriteAttributeString("xmlns", ns.Name, null, ns.Value);
            }
        }
Ejemplo n.º 4
0
 private static NamespaceDeclarationSyntax GenerateNsDeclaration(NsInfo ns)
 {
     return(SyntaxFactory.NamespaceDeclaration(SyntaxFactory.IdentifierName(ns.Name)));
 }