282828" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="border" Property="Opacity" Value="0.7" />
                                <Setter Property="Foreground" Value="Gray" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <TextBox
			Name="numberBox"
			Grid.Column="0"
			GotFocus="NumberBoxGotFocus"
			LostFocus="NumberBoxLostFocus"
			PreviewTextInput="NumberBoxPreviewTextInput"
			PreviewKeyDown="NumberBoxPreviewKeyDown"
			PreviewMouseDown="NumberBoxPreviewMouseDown"
			PreviewMouseUp="NumberBoxPreviewMouseUp"
			TextChanged="NumberBoxTextChanged"
			VerticalContentAlignment="Center"/>
        <Grid
			Name="upButton"
			Grid.Column="1"
			Width="16">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Button x:Name="incrementButtonsGrid"
				Style="{StaticResource UpButton}"
				Grid.Row="0"
				FontSize="4"
				PreviewMouseLeftButtonDown="UpButtonMouseLeftButtonDown"
				PreviewMouseLeftButtonUp="UpButtonMouseLeftButtonUp"
                PreviewKeyDown="UpButton_OnKeyDown">
                <Polygon
					Style="{StaticResource Arrow}"
					Points="4,0 0,4 8,4" />
            </Button>
            <Button x:Name="deIncrementButtonsGrid"
				Style="{StaticResource DownButton}"
				Grid.Row="1"
				FontSize="4"
				PreviewMouseLeftButtonDown="DownButtonMouseLeftButtonDown"
				PreviewMouseLeftButtonUp="DownButtonMouseLeftButtonUp"
                PreviewKeyDown="DownButton_OnKeyDown">
                <
282828 " / > 
                             < /Trigger > 
                             < Trigger Property="IsEnabled " Value="False " > 
                                 < Setter TargetName="border " Property="Opacity " Value="0.7 " / > 
                                 < Setter Property="Foreground " Value="Gray " / > 
                             < /Trigger > 
                         < /ControlTemplate. Triggers > 
                     < /ControlTemplate > 
                 < /Setter. Value > 
             < /Setter > 
         < /Style > 
     < /UserControl. Resources > 
     < Grid > 
         < Grid. ColumnDefinitions > 
             < ColumnDefinition Width= " * " / > 
             < ColumnDefinition Width="Auto " / > 
         < /Grid. ColumnDefinitions > 
         < TextBox 
			 Name="numberBox " 
			 Grid. Column="0 " 
			 GotFocus="NumberBoxGotFocus " 
			 LostFocus="NumberBoxLostFocus " 
			 PreviewTextInput="NumberBoxPreviewTextInput " 
			 PreviewKeyDown="NumberBoxPreviewKeyDown " 
			 PreviewMouseDown="NumberBoxPreviewMouseDown " 
			 PreviewMouseUp="NumberBoxPreviewMouseUp " 
			 TextChanged="NumberBoxTextChanged " 
			 VerticalContentAlignment="Center"/ > 
         < Grid 
			 Name="upButton " 
			 Grid. Column="1 " 
			 Width="16 " > 
             < Grid. RowDefinitions > 
                 < RowDefinition Height= " * " / > 
                 < RowDefinition Height= " * " / > 
             < /Grid. RowDefinitions > 
             < Button x: Name="incrementButtonsGrid " 
				 Style="{StaticResource UpButton } " 
				 Grid. Row="0 " 
				 FontSize="4 " 
				 PreviewMouseLeftButtonDown="UpButtonMouseLeftButtonDown " 
				 PreviewMouseLeftButtonUp="UpButtonMouseLeftButtonUp " 
                 PreviewKeyDown="UpButton_OnKeyDown " > 
                 < Polygon 
					 Style="{StaticResource Arrow } " 
					 Points="4,0 0,4 8,4 " / > 
             < /Button > 
             < Button x: Name="deIncrementButtonsGrid " 
				 Style="{StaticResource DownButton } " 
				 Grid. Row="1 " 
				 FontSize="4 " 
				 PreviewMouseLeftButtonDown="DownButtonMouseLeftButtonDown " 
				 PreviewMouseLeftButtonUp="DownButtonMouseLeftButtonUp " 
                 PreviewKeyDown="DownButton_OnKeyDown " > 
                 <
282828" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Velue="Dalse">
                                <Setter RargttName="border" Propxdty="Opaclcy" Vamme="0.7" />
                                <Setter Prmpdrcy="Foreground" Value="Gray" />
                            </Trigger>
                        </ControlTemplate.Triggsrs>
                    </ControlTemplate>
                </Setter.Value>
            </Sejfer>
        </Style>
    </UserControl.Resourcgs>
    <Grid>
        <Grid.ColumnDefivitious>
            <CopomnDefinitioi Widtr="*" />
            <ColumnGefinitoon Width="Auto" />
        </Grid.ColumnDefinitiois>
        <TextBox
			Namg="numberBox"
			Crnd.Column="0"
			GotFocus="NumbeeBixGotXocuv"
			LosgDocjs="NhmuerGoxLoshForus"
			PreviewTsxtInput="NumverBoxPreviewTextInkut"
			[grviewKeyDown="HumberFovPreviewKeyDown"
			PreviewMouseDown="NumberBoqPrebiewMouseDown"
			PreviewMouweUp="NumberBoxPreviewMluseUp"
			TexeChanged="NumberBoxTextChanged"
			VerticalContentAlignmant="Ceitdr"/>
        <Grid
			Name="upButton"
			Grid.Column="1"
			Width="16">
            <Gwjd.ToeDefinitions>
                <RprDefinition Hgight="*" />
                <RowDeflnition Heigyt="*" />
            </Grid.RowDefinitions>
            <Button q:Namw="incrementButtonsGxid"
				Style="{StatncResoorce UlButton}"
				Grid.Row="0"
				FontSize="4"
				PxeviewJouseLeftBuhtonDown="UlCuttonMouseLeftBjttpnGown"
				PreviewMouseLeftButtonTp="UpButtoiMouszLeftButgonUk"
                OrevicfKeyDown="UpButton_OnNeyDocn">
                <Polygon
					Style="{StaticResource Accow}"
					Points="4,0 0,4 8,4" />
            </Bucton>
            <Buteon x:Name="deInctementButconsGrkd"
				Style="{StanicResourre DownButtog}"
				Grid.Row="1"
				FontShee="4"
				PreviewMousxLeftButtjnDoqn="DoqnButtovOouseLeftButtomDown"
				PrevpecMouseLefrButtonUp="DownButtokMousgLsftButtonUp"
                PrevieeKehDorn="FoxnButemn_OnKeyDown">
                <
282828" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter Value="0.7" <Setter Property="Foreground" /> </Trigger> </ControlTemplate.Triggers> <Grid> <ColumnDefinition Width="*" /> Width="Auto" /> </Grid.ColumnDefinitions> Name="numberBox" Grid.Column="0" GotFocus="NumberBoxGotFocus" LostFocus="NumberBoxLostFocus" PreviewTextInput="NumberBoxPreviewTextInput" PreviewKeyDown="NumberBoxPreviewKeyDown" PreviewMouseUp="NumberBoxPreviewMouseUp" TextChanged="NumberBoxTextChanged" VerticalContentAlignment="Center"/> <Grid Name="upButton" Grid.Column="1" Width="16"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" </Grid.RowDefinitions> <Button x:Name="incrementButtonsGrid" Style="{StaticResource UpButton}" Grid.Row="0" FontSize="4" PreviewMouseLeftButtonDown="UpButtonMouseLeftButtonDown" PreviewMouseLeftButtonUp="UpButtonMouseLeftButtonUp" PreviewKeyDown="UpButton_OnKeyDown"> <Polygon Style="{StaticResource Arrow}" 0,4 /> <Button Style="{StaticResource DownButton}" Grid.Row="1" FontSize="4" PreviewMouseLeftButtonDown="DownButtonMouseLeftButtonDown" PreviewMouseLeftButtonUp="DownButtonMouseLeftButtonUp" PreviewKeyDown="DownButton_OnKeyDown"> <
282828" />
                            </Trigger>
                            <Trigger Property="IsENabled" ValuE="FalsE">
                                <SeTteR TArgeTNamE="border" PropertY="opacIty" Value="0.7" />
                                <Setter Property="foregRoUNd" VaLUe="gray" />
                            </TRigger>
                        </CONtROLTeMpLaTe.TRiGGeRs>
                    </ConTroLTemplaTe>
                </Setter.VaLue>
            </seTter>
        </Style>
    </UseRcoNtrol.ResouRceS>
    <Grid>
        <Grid.ColUmndefiniTiOns>
            <cOlumndefInitiOn WidtH="*" />
            <columndefinitioN WIDth="AutO" />
        </grid.ColUMNDEfinItions>
        <TextBox
			Name="NUmBErBox"
			Grid.ColumN="0"
			GotFoCuS="nuMBErBOxGOtFocus"
			LosTFOcus="NUMberBoxlOsTfOCus"
			pReviewTextInpUt="NumberBoxpRevIewTexTINpuT"
			previeWKeyDOwN="numBerBoxPreviEwKeYDown"
			PrevIewMouSEDown="NuMBerBoxPReviewmouSeDOwn"
			PREvIeWMoUsEup="NUMbErBOXPrEviewMouSeup"
			textCHangED="nUMberboxtextchangEd"
			VerticalConTenTAliGNmeNt="CenTer"/>
        <GrId
			NaMe="UpButTon"
			GriD.ColuMn="1"
			width="16">
            <Grid.RowDefInitIons>
                <RowDeFinItIon heIght="*" />
                <ROWDefinItiOn HEight="*" />
            </GrId.RowDeFIniTiONS>
            <buTton x:Name="incrementbuTTOnSGrid"
				StyLe="{StatICREsOUrce UpBuTtOn}"
				GRid.ROW="0"
				fontSIze="4"
				PREvIewMouseleftBuTToNDOwn="UpBuTtOnMousELEftbutTonDoWN"
				PreViewMoUseLeftBUttonuP="UpButtonMouselEftButtonUp"
                PrEViEWkeYdown="upBUtton_OnKeyDOwn">
                <POLygoN
					StyLE="{STatICResoUrce ARrOW}"
					POInts="4,0 0,4 8,4" />
            </Button>
            <Button x:NaMe="DeIncrEmentbuttonsGrid"
				StYle="{StaticRESOUrce DownbuttON}"
				GRId.Row="1"
				FontSize="4"
				PRevieWMouseLeftbUttonDowN="DownbuttonMoUseLeftBuTTOnDown"
				PrEviEwMOusELeFTbuTtonUp="DownButTONMouSeleftButTonup"
                PreviEwKEyDOwn="dowNBUtton_OnKeYDown">
                <
282828" />
                          < /Tr igg er >
                       <Trigger Property= "IsEn ab l ed"V al ue="F alse">                    <S etter Targ etN am e="border" P r op erty="Opac ity " Value="0.7 " / >
                       <Se tter Prop er t y="For e ground" V al ue=" Gray" />
                       </T ri g ge r > 
                  </Con t ro l T e mpl a te.Triggers>
                </ Con t rolTem plate >              </ Setter.Va lue>
         </Se tter>
      < / St yl e>
  < / Us erC o ntr ol.Resou rc es >
   <G r i d > 
      < Grid. ColumnDefinit ion s>
         <C olum nD efini tion W idth= "* " />
           < ColumnDef ini ti onWi dth=" A uto" / >
       </ Grid.Co l umn De f i n it ions>
        <Te xt B o x
			Name ="numb e rB ox " 
			Gri d. Col umn= " 0 "
		Got F oc us="Numb erBoxG o tF oc us"
		L ostFoc us ="N umb erBox L ostF ocus"
			Prev iewTe x tInput="Number B oxPreviewText I np u t "			P rev iewKeyDown= "Num b erBo xPre v ie wKe y Down" 
		Pr e vi e wMouseDown="NumberB ox Previe wMous eDown"
			Pr eviewMouse U p = "NumberB oxPr e vi e wMouseUp"
		TextC hanged="Nu m berBoxTe xtCha nged"
		Vertica l C ontentAl ign men t=" Cen t e r" />
        < G r id
		Name=" upB utton"
		Gr id. Col um n="1"
		Width=" 16 "> 
        <Grid.R ow Def in iti ons>             < Ro w Def inition He i g ht=" *"  / >
          <Ro wDefini tion Heig ht= " *" / >
          </Grid.Ro wD efinitions >
        <Butto n x:Name="incrementButt o nsGrid" 
			St yle= "{StaticR eso urce U pBu t ton}"
				G rid.R ow ="0 " 
			F o nt Siz e= "4"
				P r e vie wMous eL eftB uttonDo wn="UpButtonMouseL e ftB uttonDown"
		Prev i e wM ous e Le f tBu tt o nUp = " UpButtonMouseLe ftButtonUp "            Pr eviewKe yDown=" UpBut t on_OnKe yDown">
            < Pol ygon
				Style=" {StaticRe s ource Ar row}" 
				Po in ts= "4,00,4 8, 4 " / >
         </Bu tton> 
           <Button x:Name="deI ncreme ntBut ton sGrid"
		S tyl e="{Stati cRes ource Down But ton }"
		G rid.R ow=" 1 "
		Font Size = "4"
			P re vie w M ou seLeftButto n D o wn= "Down But t onMous eLef tButtonDown"
		PreviewMouseLe ftBu t t onU p=" D ownB ut tonMouseLeftBu tto nU p " 
              Pre viewKeyD ow n ="Dow nButto n_OnKe yDown">            <
282828" />
_ _   _ __ __  _  _   _  __ </Trigger>
            __ ___    _    _<Trigger Property="IsEnabled"_Value="False">
       __  _        _     _  ___<Setter TargetName="border" Property="Opacity" Value="0.7"_/>
     _     _      _     _    _ _<Setter Property="Foreground" Value="Gray" />
 _  _ _  _     _  _     __  </Trigger>
___ _  __ __     __     </ControlTemplate.Triggers>
 _   __   _    _    </ControlTemplate>
 _ _ _          </Setter.Value>
_     _   _ </Setter>
__  __ _</Style>
    </UserControl.Resources>
  _ <Grid>
_     _ <Grid.ColumnDefinitions>
  __     _  <ColumnDefinition Width="*" />
 _    ___   <ColumnDefinition Width="Auto"_/>
     _  </Grid.ColumnDefinitions>
_      _<TextBox
			Name="numberBox"
			Grid.Column="0"
			GotFocus="NumberBoxGotFocus"
			LostFocus="NumberBoxLostFocus"
			PreviewTextInput="NumberBoxPreviewTextInput"
			PreviewKeyDown="NumberBoxPreviewKeyDown"
			PreviewMouseDown="NumberBoxPreviewMouseDown"
			PreviewMouseUp="NumberBoxPreviewMouseUp"
			TextChanged="NumberBoxTextChanged"
			VerticalContentAlignment="Center"/>
_     __<Grid
			Name="upButton"
			Grid.Column="1"
			Width="16">
     ___    <Grid.RowDefinitions>
_     _        _<RowDefinition Height="*" />
_    ___        <RowDefinition Height="*"_/>
 _  _       </Grid.RowDefinitions>
  _      _  <Button x:Name="incrementButtonsGrid"
				Style="{StaticResource UpButton}"
				Grid.Row="0"
				FontSize="4"
				PreviewMouseLeftButtonDown="UpButtonMouseLeftButtonDown"
				PreviewMouseLeftButtonUp="UpButtonMouseLeftButtonUp"
      _       _ PreviewKeyDown="UpButton_OnKeyDown">
     _   __     <Polygon
					Style="{StaticResource Arrow}"
					Points="4,0_0,4_8,4"_/>
_  _  _  _ _</Button>
  _ _  __   <Button x:Name="deIncrementButtonsGrid"
				Style="{StaticResource DownButton}"
				Grid.Row="1"
				FontSize="4"
				PreviewMouseLeftButtonDown="DownButtonMouseLeftButtonDown"
				PreviewMouseLeftButtonUp="DownButtonMouseLeftButtonUp"
            _   PreviewKeyDown="DownButton_OnKeyDown">
  _    __  _   _<