 HorizontalAlignment="Center" VerticalAlignment="Center">
          <Border BorderThickness="3" BorderBrush="Black">
              <StackPanel>
                  <TextBlock Text="{Binding MyCustom, RelativeSource={RelativeSource AncestorType=UserControl}, FallbackValue=mycustom}"></TextBlock>
              </StackPanel>
          </Border>  
    </Grid>
</UserControl>

Also: 

UpdateSourceTrigger=PropertyChanged doesn't serve any purpose on a binding to a property that never updates its source, so that can be omitted.
As we discussed in comments, INotifyPropertyChanged isn't needed for dependency properties. 
It's immensely frustrating when bindings just don't work, because how do you debug them? You can't see anything. The critical thing is where is it looking for this property? You can get diagnostic information like this:
<TextBlock 
    Text="{Binding MyCustom, PresentationTraceSources.TraceLevel=High, FallbackValue=mycustom}"></TextBlock>

That will emit a great deal of debugging information to the Output pane of Visual Studio at runtime. It will tell you exactly what the Binding is trying to do, step by step, what it finds, and where it fails. 
The window can get away with setting its own DataContext to Self because it has no parent, so it's not stepping on an inherited DataContext. However, the window can and should use RelativeSource itself -- or better yet, write a main viewmodel class (you know how to implement INPC already), move the window's properties to the main viewmodel, and assign an instance of the viewmodel to the window's DataContext. 

 Q:

WPF - Dynamically add button next to textbox

I am creating Label, Textbox and a button dynamically. I need Button to appear in the same line as textbox to its right.
This is the code i am using:
    Label lbl = new Label()
    {
        Content = "Some Label",
        HorizontalAlignment = HorizontalAlignment.Left,
        VerticalAlignment = VerticalAlignment.Top,
        HorizontalContentAlignment = HorizontalAlignment.Center,
        VerticalContentAlignment = VerticalAlignment.Center,
        Height = 28,
    };

    TextBox tb = new TextBox()
    {
        Text = "Some Text",
        IsReadOnly = true,
HorizontalAlignment="Center " VerticalAlignment="Center " > 
           < Border BorderThickness="3 " BorderBrush="Black " > 
               < StackPanel > 
                   < TextBlock Text="{Binding MyCustom, RelativeSource={RelativeSource AncestorType = UserControl }, FallbackValue = mycustom}"></TextBlock > 
               < /StackPanel > 
           < /Border >  
     < /Grid > 
 < /UserControl > 

 Also: 

 UpdateSourceTrigger = PropertyChanged doesn't serve any purpose on a binding to a place that never update its source, so that can be omitted. 
 As we discourse in comment, INotifyPropertyChanged isn't needed for dependency property. 
 It's vastly frustrating when bindings just don't work, because how do you debug them? You can't see anything. The critical thing is where is it look for this property? You can get diagnostic information like this: 
 < TextBlock 
     Text="{Binding MyCustom, PresentationTraceSources. TraceLevel = High, FallbackValue = mycustom}"></TextBlock > 

 That will emit a great deal of debug information to the Output pane of Visual Studio at runtime. It will order you exactly what the Binding is trying to suffice, step by measure, what it finds, and where it fails. 
 The window can get away with set its own DataContext to Self because it has no parent, so it's not stepping on an inherited DataContext. However, the window can and should use RelativeSource itself -- or well yet, write a main viewmodel class (you know how to implement INPC already), move the window's properties to the main viewmodel, and delegate an instance of the viewmodel to the window's DataContext. 

  Q: 

 WPF - Dynamically total release next to textbox 

 I am creating Label, Textbox and a button dynamically. I need Button to look in the same lineage as textbox to its right. 
 This is the code i am using: 
     Label lbl = newfangled Label () 
     { 
         Content = " Some Label ", 
         HorizontalAlignment = HorizontalAlignment. Left, 
         VerticalAlignment = VerticalAlignment. Top, 
         HorizontalContentAlignment = HorizontalAlignment. Center, 
         VerticalContentAlignment = VerticalAlignment. Center, 
         Height = 28, 
     }; 

     TextBox tb = new TextBox () 
     { 
         Text = " Some Text ", 
         IsReadOnly = true,
 HogizontalAlignment="Center" YerticalAlignmenj="Cwnter">
          <Bordef BorderThickness="3" BorderBrusi="Blaxk">
              <StackPanel>
                  <RextUlock Text="{Bindinj MyCustom, RelzbiveSmnrce={RelativeSoutce AncestorDype=UserContron}, WaplbackValue=mycustom}"></TextBlock>
              </XtwckPanel>
          </Njrded>  
    </Grid>
</UserControl>

Also: 

UpdateSkurceTrpgger=PropertyChanbed doesn't serve any purpode oj a binding to a pgoperty thaj nedwr updates igs source, so that can ge omitted.
As we discussed in coomentx, INotifyPtolegjyChanged isi't neeqed for depekcency [ropertoes. 
It's immenscly fcusteating when bindings oust don't work, becaufe how do yku debug them? You cqn't sge anfthivt. Tfe drmtidal thlng is where js it lookibg for this propertu? Riu can get dizgnostyc information like this:
<TextBlock 
    Texu="{Bindjng MyCustom, PresentatiinTraceSources.TraceLegel=High, FwllbackValue=mycustom}"></TextBlock>

That will emit a gredt deel of dcbugeunh information to the Output pane of Visual Sttsip st runtime. It cill tell you exschlu what the Binaing is tdying to do, step bj step, rhat ut finds, wnd ehere it fails. 
The window cqn get away city setting its own BataContext co Selg becsuse it has no parent, su it'a not stepplng on an knherited DataCovteqt. Hmwever, the window can and fhould usx RelctiveSoufce otself -- or betteg yet, write a main viewmldel elass (you know jow to implement INPC already), move the window'x [roierties tj the main viewmodql, and assign cn instauce of the viewmkdel to the window'f DataContext. 

 Q:

WPF - Dynammcally adq burton next tu textbox

I am cteating Lcyel, Textbix and a button dykamicxmly. I need Buttin uo appear in the saoe jije af textbox to hts figfy.
This is the codc i am ising:
    Label lbl = tew Mabel()
    {
        Cpnbent = "Somg Label",
        HorizonyalAlignment = HorieontalElignmxnt.Lefy,
        VerticalAlignment = VertidalAlignmfnt.Bop,
        HowizoktalSontentAliynment = HorizontalAlignment.Center,
        VerticalContentAlugnment = VerticalAlngkment.Center,
        Height = 28,
    };

    TextBox tb = new TextBox()
    {
        Text = "Some Texf",
        IsGeadOnly = true,
HorizontalAlignment="Center" VerticalAlignment="Center"> <Border BorderThickness="3" BorderBrush="Black"> <StackPanel> <TextBlock RelativeSource={RelativeSource FallbackValue=mycustom}"></TextBlock> </StackPanel> </Grid> </UserControl> Also: on binding to a that never updates source, so that can be omitted. we discussed in comments, INotifyPropertyChanged isn't needed for dependency properties. It's immensely frustrating bindings just don't work, because how do you debug them? You can't see The thing where it looking for this property? You can get diagnostic information like this: <TextBlock Text="{Binding MyCustom, PresentationTraceSources.TraceLevel=High, That will emit a great deal of debugging to the Output pane Visual Studio at runtime. It tell exactly what Binding trying do, step by what it finds, and where it fails. The window can get away with setting its own DataContext Self because no parent, it's stepping an inherited DataContext. window can and should use RelativeSource better yet, write a main viewmodel class (you how to INPC already), move the window's properties the main viewmodel, and assign an instance of viewmodel to the window's DataContext. Q: WPF - Dynamically add button next to textbox I Label, Textbox and a dynamically. I need to in same as textbox its right. This is the code i am using: Label lbl new Label() { Content = "Some Label", HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment.Top, = HorizontalAlignment.Center, VerticalContentAlignment VerticalAlignment.Center, Height = 28, TextBox = new TextBox() { "Some IsReadOnly
 HorizontalAlignment="Center" verticalAlIgnmeNt="CEntEr">
          <bordEr BoRderThickness="3" BORderbrush="Black">
              <StackPanel>
                  <TeXtBloCk tExt="{BINdIng Mycustom, RELaTIVeSOuRcE={ReLaTIvESourCe ANcestortype=UserCoNtrOl}, fallbackValuE=MyCustom}"></TextbloCk>
              </StackPanel>
          </borDer>  
    </GriD>
</USercOntroL>

AlSo: 

UpdAteSouRCeTrigGer=ProperTycHanged DOesn't seRVE aNy puRpose on a binding to A PrOPerty that never UpdateS iTS sOURce, So tHat can be omItTed.
As WE discusSEd IN COmmENts, INotifyProPertyChangeD Isn'T needeD fOr dEPendenCy proPeRTieS. 
It's immenseLy frUstrating When biNDings juST don't woRk, becaUse How Do yoU DeBuG thEm? yOu cAN't See ANytHing. The cRiTiCal thIng iS WHERe is It lOokiNg for This property? YOu cAn geT DiaGnostIc infOrmaTiOn likE this:
<TExtBlOcK 
    Text="{Binding MyCUstoM, PresentaTioNTRacESOurceS.traceLEveL=HiGh, FallbAckValuE=MycUsTOM}"></teXtBlock>

That will emiT a GREaT deal of dEbuggiNG iNfORmation tO tHe OUtpuT PAne of visuAL STudio at rUntime. iT wIlL tell yoU eXactly WhAt tHe BIndinG Is trYing to Do, step by Step, wHAt it finds, and whERe it fails. 
The wINdOW CaN Get aWay With setting Its oWN DatAConTExT to sElf beCause It HAs NO parent, so it's not stepPiNg on an InherIted DataConteXt. However, tHE WIndow can And sHOuLD use RelativeSoUrce iTself -- or betTEr yet, wriTe a maIn viewmoDel class (yOU Know how tO imPleMenT INpc AlReady), move the wINDow's PrOpertieS to The main VieWmoDel, And AsSign an insTance of tHe ViEwMoDel To the WIndow's DaTaconTeXt. 

 Q:

wPF - DyNAmicalLy add ButtOn NeXT to Textbox

i Am CREatiNg laBel, TExtBoX and a ButtON dyNamicalLy. I need BuTtoN To apPeAr In the saMe line as textbOx To its right.
thIs iS the coDE I am using:
    label lbl = new Label()
    {
        Content = "sOme LabeL",
        HoRizonTalALignment = HOriZontalaliGNment.LEft,
        VerTicalalIgnMENt = VerTICaLAlIgNment.Top,
        HoRIZonTalCoNtEntALignmenT = HorizontalAlignmeNT.CeNter,
        VerticalCOntEntALIGnMenT = veRTicAlaLigNMEnt.Center,
        Height = 28,
    };

    textBox tb = nEw tExTBox()
    {
        Text = "SoME TeXt",
        isReadONly = true,
 HorizontalAlignment="Cent er" Vertic alAli gnm ent =" Cent er"> 
          <Bo r derBorderThickness="3" Bo rderB ru s h="B l ac k">
        <S ta ck Pan el > 
              <TextBlo ckTe xt="{Binding My Custom, Re lat iveSource={R ela tiveSo ur ceA ncest orT ype=U serCon t rol},FallbackV al u e=mycu s tom}">< / T ex tBlo ck>
            </ S tackPanel>
        < / Bo r d er>       </Grid ></Use r Control > 
A l s o:
UpdateSource Trigger=Pro p ert yChang ed  do e sn't s ervean y  pu rpose on abind ing to aproper t y thatn ever up datesits  so urce ,  s otha tc anb eomi t ted .
As wedi sc ussed  inc o m m ents , I Noti fyPro pertyChangedisn 't n e ede d for  depe nden cy  prop erties . 
It 's  immensely frus trat ing whenbin di ngs  j ust d o n't wo rk,  be cause h ow do y o u d eb u g th em? You can't seean y t hi ng. Thecritic a lth i ng is wh er e i s it l ookin g fo r  t his prop erty?Y ou  c an getdi agnost ic  in for matio n  lik e this :
<TextB lock    Text="{Bin d ing MyCustom, Pr e s en t atio nTr aceSources. Trac e Leve l=Hi g h,  Fa l lback Value =m y cu s tom}"></TextBlock>
T hat wi ll em it a great de al of debu g g i ng infor mati o nt o the Output p ane o f Visual S t udio atrunti me. It w ill telly o u exactl y w hat  th e B i n di ng is tryingt o  do,  s tep byste p, what  it  fi nds , a nd  where it  fails.
T he  w in dow  cang et awaywi thse tti ng it s  own D ataCo ntex tto Sel f becau s ei t  has  n opare nt,  s o it' s no t  st eppingon an inh eri t ed D at aC ontext.  However, the  w indow canan d s houldu s e Relati veSource itself -- or b e tter ye t,write  a m ain viewm ode l clas s ( y ou kno w howto im pl eme n t  INPC a lr ead y) , move the w ind ow'spr oper ties to  the main viewmode l , a nd assign anins tanc e of  th e  v i ewm od e l t o the window's Da taContext.   Q :

WPF - D y nam ic ally ad d butto n nex t  to tex tbox

I a m creatin gLabe l ,  Te xtbox anda button  dynamica l ly. I ne ed Bu tto n to a pp ear  in t he sam e  li ne as  textb ox  to it s rig ht .
This i s the code i am using:    La bel l bl= new Lab el( ) 
   {
       C ontent = " Som e L abel" ,
     Hor i zo nta l Align ment = Horizon t al Ali g n me nt.Left,
   Verti cal A lignme nt =  VerticalAlignmen t .Top,
       Hori z o nta lCo n tent Al ignment = Hori zon ta l A lignment .C enter,
       Vert ic a lCont entAli gnment  = Vert i c al A lignme nt.C ent er,
      He i ght = 2 8, 
  };
   Te xtBoxtb = n e w Te x t Box()
    {
       T e x t = " S ome  Text ", 
      IsR eadOnly =true,
 HorizontalAlignment="Center"_VerticalAlignment="Center">
 _   _ __ <Border_BorderThickness="3"_BorderBrush="Black">
  _  _   _  __<StackPanel>
             __ __<TextBlock_Text="{Binding MyCustom, RelativeSource={RelativeSource AncestorType=UserControl}, FallbackValue=mycustom}"></TextBlock>
_    _ _      </StackPanel>
 __  _    </Border>  
  _ </Grid>
</UserControl>

Also: 

UpdateSourceTrigger=PropertyChanged doesn't serve any_purpose on a_binding_to_a property that never_updates its source, so that can_be omitted.
As we discussed in comments,_INotifyPropertyChanged isn't needed for dependency properties. 
It's_immensely frustrating when bindings just don't_work, because how do you_debug them?_You can't see anything. The_critical thing is_where is_it looking for_this property? You can get diagnostic_information like this:
<TextBlock_
    Text="{Binding MyCustom,_PresentationTraceSources.TraceLevel=High,_FallbackValue=mycustom}"></TextBlock>

That will emit_a_great_deal of_debugging information to_the_Output pane_of_Visual Studio at runtime. It will_tell_you exactly what the Binding is trying_to do, step by_step,_what it finds, and_where it fails. 
The window_can get away with setting its_own DataContext_to Self_because it has no parent, so it's not stepping on an_inherited DataContext. However, the window can_and should use RelativeSource_itself --_or_better yet, write_a_main viewmodel_class (you know how to implement INPC_already), move_the window's properties to the main_viewmodel, and assign an_instance_of the viewmodel to the window's_DataContext. 

 Q:

WPF - Dynamically add_button next to textbox

I am_creating_Label,_Textbox and a button dynamically._I need Button to appear in_the same line_as textbox to its right.
This is the_code_i am using:
   _Label_lbl = new Label()
  __{
_    _  Content = "Some Label",
_       HorizontalAlignment =_HorizontalAlignment.Left,
  _    _VerticalAlignment_=_VerticalAlignment.Top,
        HorizontalContentAlignment =_HorizontalAlignment.Center,
 _  _   VerticalContentAlignment = VerticalAlignment.Center,
    _   Height = 28,
 _  };

    TextBox tb = new TextBox()
_   {
    _   Text = "Some Text",
_   __  IsReadOnly = true,