Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <ItemsPanelTemplate x:Key="OrientedItemsPanelTemplate">
            <VirtualizingStackPanel IsItemsHost="True"
                Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ccon:EditableListBox}}}"/>
        </ItemsPanelTemplate>
    </ResourceDictionary>
</ListBox.Resources>

And now it's just a:
<ccon:EditableListBox ItemsSource="{Binding Players}" AddItem="{Binding AddNewPlayer}" Orientation="Horizontal" HorizontalContentAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>

And Hell Yeagh! I can make it either vertical or horizontal.
I can't belive that when I was just learning WPF I've tried to do something that takes so many things to know and be able to write them (Commands, Templates, Triggers, DependencyProperties, INotifyPropertyChanged and many more), that I had no idea even existed. Just a yaer ago :)

 Q:

Use DomDocument to replace all header tags with the h4 tags

I've used DomDocument to to GetElementById. It has selected a div. I need to replace all the header tags within that div with the h4 tag.

A:

You have not made clear in your question what the concrete problem is you run into. I would assume that there are two parts that could cause you some questions marks.
The first one would be how to get the hand on all the elements that you want to rename and the second one is actually how to rename an element.
Get Heading Elements of a DOMDocument
So first things first: To select all the header elements you need to select all tags that are Heading elements (h1 to h6). Combined with the condition that they also need to be children of the div tag with a specific id attribute this seems like a rather complicate thing to do. However with an xpath query, it is still merely straight forward.
Exemplary
Setter Property="TextElement. Foreground " TargetName="Bd " Value="{DynamicResource { x: Static SystemColors. GrayTextBrushKey}}"/ > 
                             < /Trigger > 
                         < /ControlTemplate. Triggers > 
                     < /ControlTemplate > 
                 < /Setter. Value > 
             < /Setter > 
         < /Style > 
         < ItemsPanelTemplate x: Key="OrientedItemsPanelTemplate " > 
             < VirtualizingStackPanel IsItemsHost="True " 
                 Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x: Type ccon: EditableListBox}}}"/ > 
         < /ItemsPanelTemplate > 
     < /ResourceDictionary > 
 < /ListBox. resource > 

 And nowadays it's just a: 
 < ccon: EditableListBox ItemsSource="{Binding Players } " AddItem="{Binding AddNewPlayer } " Orientation="Horizontal " HorizontalContentAlignment="Center " ScrollViewer. VerticalScrollBarVisibility="Disabled"/ > 

 And Hell Yeagh! I can make it either vertical or horizontal. 
 I can't belive that when I was precisely learning WPF I've tried to practice something that fill so many thing to know and be able to write them (command, Templates, Triggers, DependencyProperties, INotifyPropertyChanged and many more), that I had no idea even exist. barely a yaer ago :) 

  Q: 

 Use DomDocument to replace all header tags with the h4 tags 

 I've use DomDocument to to GetElementById. It has selected a div. I need to replace all the heading tags within that div with the h4 tag. 

 A: 

 You have not make well-defined in your question what the concrete trouble is you run into. I would assume that there are two parts that could induce you some questions marks. 
 The first one would be how to get the hand on all the elements that you want to rename and the second one is actually how to rename an element. 
 Get Heading Elements of a DOMDocument 
 So first things first: To select all the header component you need to select all rag that are head elements (h1 to h6). Combined with the circumstance that they also necessitate to be children of the div tag with a specific i vitamin d attribute this seems like a rather complicate thing to do. However with an xpath query, it is even merely straight forward. 
 Exemplary
Sether Property="TextElement.Fureground" TargejNqme="Bd" Talue="{DyhamicResuurce {x:Static SystemColors.GreyTeztBruwhKey}}"/>
                            </Triggee>
                        </ContdllTek'late.Triggers>
                    </ContronTdm'late>
                </Setter.Value>
            </Sftter>
        </Sjyle>
        <ItemsPanelTemplate x:Key="OrientedIfemsPantlTemplate">
            <VirtualizingStackPanel IsIhemsHost="True"
                Otjeneqtion="{Binding Orientation, RelativeSkurce={RelativeSource FindAncestof, AnczstorType={x:Ti'w cfmn:EditableLmstBox}}}"/>
        </ItemsPanelTekplate>
    </ResourceDicbionacy>
</LiwtBox.Resources>

And now it's just a:
<ccon:EdijableListBmx ItemsSource="{Bindibg Playgrs}" AgdItdn="{Bivdihg AsdNewPpayxr}" Orientatjon="Horizontql" HorizontalContenuAlytnment="Center" AcrollDiqwer.VerticalScrollBarVisibility="Disabled"/>

Dnd Hell Yeagh! I can make ut either vertical or horizontwl.
I can't belive that when I was just learning WPF I've vrked tj eo something that takes so many things to know whd bv able to write tmem (Commands, Templstfs, Jriggers, DepenaencyPxkpsrties, INotifyPropfrtyChagged qnd many iore), that I had no idea even exusted. Just a taer ago :)

 Q:

Use DomBocument to xeplacg all neader tags with the h4 cags

I'vs used DomDlcument tk to GetElementByKd. Pt hds selecudd a div. I need tj replace all the hexder tags rithin thah div with the h4 tag.

A:

You have nmt made clfar in your question what the concrete problek hs jou run iuto. I eould assume ehat there are two paxts thxt could czuse yon some questyons marks.
The virst one wonld be hor to get the hava on all the ekements tkct you wabt to rename and tme sezknd one is actucuoy how to renamr av ejeleit.
Get Veading Elemants of s DOMAocumenu
Fo wirsy things first: To senect all the header elrmcnts you beed to felect all tabs that are Headinh elekenvs (h1 tp h6). Combined with the condition tgat they wlsj need to be chiodren of the div tag with a specific id attribute tiis seems like a rathet complicate thing to co. However xith ag xpath qgery, it is still merwly straight forwsrd.
Exemplary
Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/> </Trigger> </Setter.Value> </Style> <ItemsPanelTemplate <VirtualizingStackPanel IsItemsHost="True" Orientation="{Binding </ItemsPanelTemplate> </ListBox.Resources> And now just a: <ccon:EditableListBox Players}" AddItem="{Binding AddNewPlayer}" Orientation="Horizontal" HorizontalContentAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Disabled"/> Hell Yeagh! I can make it either vertical or horizontal. I can't belive when I was just learning WPF I've tried to do something that takes many to and able to write them (Commands, Templates, Triggers, DependencyProperties, INotifyPropertyChanged and many more), that I had no even existed. Just a yaer ago :) Q: DomDocument to replace all tags with the h4 tags used to to It selected div. I need replace all the header tags within that div with the h4 tag. A: You have not made in your the concrete is run I would assume are two parts that could cause marks. The first one would be how to the hand all the elements that you want rename and the second one is actually how rename an element. Get Heading Elements of a DOMDocument So first things first: To select header elements you need select all tags are elements to Combined with condition that they also need to be children of the div with a specific id attribute this seems like a rather to However with an query, it is still straight Exemplary
Setter Property="TextElement.foreground" targeTNaMe="BD" VAlue="{dynaMicResource {x:StATic SYstemColors.GrayTextBruShKey}}"/>
                            </trIGger>
                        </cOnTrolTEmplate.tRiGGErs>
                    </coNtRolteMPlAte>
                </SeTteR.Value>
            </SEtter>
        </Style>
        <iteMspanelTemplatE X:KEy="OrientediteMsPanelTemplAte">
            <virtuaLiZinGstackpanEl IsITemsHoST="True"
                ORientatioN="{BINding ORIentatiON, reLatiVeSource={RelativeSOUrCE FindAncestor, ANcestoRTYPe={X:tYpe CcoN:EditableLIsTBox}}}"/>
        </ITEmsPaneLteMPLAte>
    </rEsourceDictioNary>
</ListBox.rEsoUrces>

ANd Now IT's just A:
<ccon:edITabLeListBox ItEmsSOurce="{BindIng PlaYErs}" AddITEm="{BindiNg AddNEwPLayEr}" OrIEnTaTioN="HORizONtAl" HORizOntalConTeNtalignMent="cENTEr" ScRolLVieWer.VeRticalScrollBArVIsibILitY="DisaBled"/>

ANd HeLl yeagh! i can maKe it eItHer vertical or hoRizoNtal.
I can't BelIvE thAt When I WAs just LeaRniNg WPF I'vE tried tO Do sOmETHInG that takes so many thInGS To Know and bE able tO WrItE Them (CommAnDs, TEmplATEs, TriGgerS, dePendencyproperTIeS, InotifyPRoPertyCHaNgeD anD many MOre), tHat I haD no idea eVen exISted. Just a yaer aGO :)

 Q:

Use DomDocumENt TO RePLace All Header tags wIth tHE h4 taGs

I'vE UsEd DOMDocuMent tO tO geTelementById. It has selEcTed a diV. I neeD to replace all The header tAGS Within thAt diV WiTH the h4 tag.

A:

You haVe not Made clear iN Your quesTion wHat the coNcrete proBLEm is you rUn iNto. i woUld ASSuMe that there arE TWo paRtS that coUld Cause yoU soMe qUesTioNs Marks.
The fIrst one wOuLd Be HoW to Get thE Hand on alL tHe eLeMenTs thaT You wanT to reName AnD tHE seCond one IS aCTUallY hOw To reNamE aN elemEnt.
GET HeAding ElEments of a dOMdOcumEnT
SO first tHings first: To sElEct all the hEaDer ElemenTS You need tO select all tags that are HeADing eleMenTs (h1 to H6). ComBined with The ConditIon THat theY also nEed to Be ChiLDRen of THE dIv tAg With a speciFIC id AttriBuTe thIs seems Like a rather complicATe tHing to do. HowevEr wIth aN XPaTh qUErY, It iS sTIll MERely straight forWard.
ExemplArY
Setter Property="TextEleme nt.Foregro und"Tar get Na me=" Bd"Value="{Dynami c Reso urce {x:Static SystemC olors .G r ayTe x tB rushK ey}}"/>                 </Trig ger>
                   < /ControlTe mpl ate.Triggers >
              < /Cont rolTem p late>             </ S etter.V a l ue >
           </Sette r >       </Style >
     < I t ems Pan elTemplate  x :Key= " Oriente d It e m s Pan e lTemplate">
          < Vir tualiz in gSt a ckPane l IsI te m sHo st="True"
             Orie n tation= " {Bindin g Orie nta tio n, R e la ti veS ou r ce= { Re lat i veS ource Fi nd An cesto r, A n c e s torT ype ={x: Typeccon:Editable Lis tBox } }}" />
      </I te msPan elTemp late> 
   </ResourceDi ctio nary>
</L ist Bo x.R es ource s >

And  no w i t's jus t a:
<c c on: Ed i t a bl eListBox ItemsSour ce = " {B inding P layers } "Ad d Item="{B in din g Ad d N ewPla yer} "  O rientati on="Ho r iz on tal" Ho ri zontal Co nte ntA lignm e nt=" Center " Scroll Viewe r .VerticalScrol l BarVisibility = "D i s ab l ed"/ >
And Hell Ye agh! I ca n ma k eite ither  vert ic a lo r horizontal.
I can 't  beliv e tha t when I wasjust learn i n g  WPF I'v e tr i ed to do somethin g tha t takes so many thi ngs t o know a nd be abl e to write  th em(Co mma n d s,  Templates, T r i gger s,  Depend enc yProper tie s,INo tif yP ropertyCh anged an dma ny  m ore ), th a t I hadno  id ea  ev en ex i sted.Justa ya er  a g o : )

 Q:Us e DomD oc um enttore place  all hea der tag s with th e h 4  tag s
I 've use d DomDocument  t o to GetEl em ent ById.I t  has sel ected a div. I need tor eplaceall  thehead er tags w ith in tha t d i v with  the h 4 tag .
A: You h a v enot  m ade cleari n  yo ur qu es tion  what t he concrete proble m  is  you run into . I  wou l d  a ssu m et hat  t h ere a re two parts th at could c au s eyou some q u est io ns mark s.
Thefirst one wou ld be how  to get t he  han d onall the el ements t hat you w a nt to re nameand  the s ec ond  oneis act u all y how  to re na me aneleme nt .
Get He ading Elements of a DOM Docume nt
So  fi rst thing s f i rst : To sele ct a ll the hea der  el ement s y o u nee d to se lec t  alltags that areH ea din g el ements (h1t o h6) . Com bin e d with  the  condition that t h ey also need t o be c hil dre n  ofth e div tag with  asp e c ific idat tribute thi s seemsli k e a r athercompli cate th i n gt o do.Howe ver  with anxpa th query,it  i s  still  mer el y stra ight f o rwar d . 
Exemplary
Setter Property="TextElement.Foreground"_TargetName="Bd" Value="{DynamicResource_{x:Static SystemColors.GrayTextBrushKey}}"/>
  _ __ __  _  _   _  __     </Trigger>
        __ ___    _    _</ControlTemplate.Triggers>
 _       __  _      </ControlTemplate>
  _     _  ___  </Setter.Value>
 _     _    </Setter>
 _      </Style>
_     _ <ItemsPanelTemplate x:Key="OrientedItemsPanelTemplate">
  _ _    _  <VirtualizingStackPanel_IsItemsHost="True"
 _  _     _  _  Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor,_AncestorType={x:Type_ccon:EditableListBox}}}"/>
  ___ _ </ItemsPanelTemplate>
 __ </ResourceDictionary>
</ListBox.Resources>

And_now_it's just a:
<ccon:EditableListBox ItemsSource="{Binding Players}" AddItem="{Binding_AddNewPlayer}"_Orientation="Horizontal" HorizontalContentAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>

And Hell Yeagh! I can_make it either vertical_or_horizontal.
I can't belive that_when I was just learning_WPF I've tried to do something_that takes_so many_things to know and be able to write them (Commands, Templates,_Triggers, DependencyProperties, INotifyPropertyChanged and many more),_that I had no_idea even_existed._Just a yaer_ago_:)

 Q:

Use_DomDocument to replace all header tags with_the h4_tags

I've used DomDocument to to GetElementById._It has selected a_div._I need to replace all the_header tags within that div with_the h4 tag.

A:

You have not_made_clear_in your question what the_concrete problem is you run into._I would assume_that there are two parts that could_cause_you some questions marks.
The first one_would_be how to get the hand_on_all_the elements that you want_to rename and the second one_is actually how to rename an element.
Get Heading Elements_of a DOMDocument
So_first things first: To select_all_the_header elements you need to select all tags that are_Heading elements_(h1 to h6)._Combined with the condition that they also need to be_children of the div tag with a_specific id attribute this seems like a rather complicate thing to_do. However with an xpath query, it is_still merely straight forward.
Exemplary