PivotItem ScrollViewer can't scroll down - silverlight

PivotItem ScrollViewer can't scroll down
For whatever the reason just won't scroll down when content that is bound inside the pivot item is longer than the height of the page. I tried adding a grid inside the pivotitem with height set to auto, but to no avail.
<controls:PivotItem>
<controls:PivotItem.Header>
<Grid>
<TextBlock Name="TextBlockPropertyDetail" FontSize="31" Text="Property Detail" />
</Grid>
</controls:PivotItem.Header>
<ScrollViewer>
<Grid Height="Auto">
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock1" Text="Property Id" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,41,0,0" Name="textBlock2" Text="County" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,77,0,0" Name="textBlock3" Text="Parcel Number" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,113,0,0" Name="textBlock4" Text="Market Value" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,149,0,0" Name="textBlock5" Text="Document Image" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,185,0,0" Name="textBlock6" Text="Value Range" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" Margin="12,221,279,0" Name="textBlock7" Text="Insured" VerticalAlignment="Top" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,257,0,0" Name="textBlock8" Text="Case Number" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,293,0,0" Name="textBlock9" Text="Recording Date" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,329,0,0" Name="textBlock10" Text="Recording Book" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,365,0,0" Name="textBlock11" Text="Recording Page" VerticalAlignment="Top" Width="189" Foreground="Black" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,5,0,0" Name="tbkPropertyId" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,41,0,0" Name="tbkCounty" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,77,0,0" Name="tbkParcelNo" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,113,0,0" Name="tbkMarketValue" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,149,0,0" Name="tbkDocumentImage" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,185,0,0" Name="tbkValueRange" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,221,0,0" Name="tbkInsured" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,257,0,0" Name="tbkCaseNo" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,293,0,0" Name="tbkRecordingDate" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,329,0,0" Name="tbkRecordingBook" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="Black" Height="30" HorizontalAlignment="Left" Margin="241,365,0,0" Name="tbkRecordingPage" Text="Loading..." VerticalAlignment="Top" Width="189" />
</Grid>
</ScrollViewer>
</controls:PivotItem>
Thanks for any advice.

Use the Stackpanel in the grid Element and try this.
<controls:Pivot Title="MY APPLICATION">
<!--Pivot item one-->
<controls:PivotItem Header="first" Height="580" >
<!--Double line list with text wrapping-->
<ScrollViewer>
<Grid>
<StackPanel>
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock1" Text="Property Id" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock2" Text="County" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock3" Text="Parcel Number" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock4" Text="Market Value" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock5" Text="Document Image" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock6" Text="Value Range" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" Margin="12,5,279,0" Name="textBlock7" Text="Insured" VerticalAlignment="Top" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock8" Text="Case Number" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock9" Text="Recording Date" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock10" Text="Recording Book" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlock11" Text="Recording Page" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-385,0,0" Name="tbkPropertyId" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-350,0,0" Name="tbkCounty" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-315,0,0" Name="tbkParcelNo" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-275,0,0" Name="tbkMarketValue" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-240,0,0" Name="tbkDocumentImage" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-205,0,0" Name="tbkValueRange" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-170,0,0" Name="tbkInsured" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-135,0,0" Name="tbkCaseNo" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-100,0,0" Name="tbkRecordingDate" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-65,0,0" Name="tbkRecordingBook" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-30,0,0" Name="tbkRecordingPage" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlsock1" Text="Property Id" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textsBlock2" Text="County" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBslock3" Text="Parcel Number" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textsBlock4" Text="Market Value" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textsBlock5" Text="Document Image" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textsBlock6" Text="Value Range" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlocsk7" Text="Insured" VerticalAlignment="Top" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBslock8" Text="Case Number" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBslock9" Text="Recording Date" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBlsock10" Text="Recording Book" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Height="30" HorizontalAlignment="Left" Margin="12,5,0,0" Name="textBsock11" Text="Recording Page" VerticalAlignment="Top" Width="189" Foreground="White" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-380,0,0" Name="tbkPropsertyId" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-345,0,0" Name="tbkCosunty" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-310,0,0" Name="tbkPasrcelNo" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-275,0,0" Name="tbkMsarketValue" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-240,0,0" Name="tbkDsocumentImage" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-205,0,0" Name="s" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-170,0,0" Name="tsbkInsured" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-135,0,0" Name="tbskCaseNo" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-100,0,0" Name="tbskRecordingDate" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-70,0,0" Name="tbksRecordingBook" Text="Loading..." VerticalAlignment="Top" Width="189" />
<TextBlock Foreground="White" Height="30" HorizontalAlignment="Left" Margin="241,-35,0,0" Name="tbkRsecordingPage" Text="Loading..." VerticalAlignment="Top" Width="189" />
</StackPanel>
</Grid>
</ScrollViewer>
</controls:PivotItem>
</controls:Pivot>
And I hope you will get the Solution.

Related

Textbox Border Not Showing - WPF

The textbox top and bottom border is not showing.
I have provided the entire XAML code for the main window. I have tried increasing the BorderThickness and also changed the BorderBrush. That did not work.
XAML:
<Window x:Class="WpfApplication6.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication6"
mc:Ignorable="d"
Title="Activation Window" Height="300" Width="518.797">
<Grid>
<TextBox x:Name="txtFirstDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="23,171,0,76" BorderThickness="1" BorderBrush="Black" />
<TextBox x:Name="txtSecondDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="81,171,0,76"/>
<TextBox x:Name="txtThirdDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="138,171,0,76"/>
<TextBox x:Name="txtFourthDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="195,171,0,76"/>
<TextBox x:Name="txtFifthDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="252,171,0,76"/>
<Label x:Name="label" Content="Product key:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="23,142,0,0"/>
<TextBox x:Name="txtFirstDigit_Copy" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="274" Margin="23,111,0,136" />
<Label x:Name="label_Copy" Content="Email:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="23,81,0,0"/>
<TextBox x:Name="txtFirstDigit_Copy1" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="130" Margin="23,55,0,192" />
<Label x:Name="label_Copy1" Content="First Name:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="23,25,0,0"/>
<TextBox x:Name="txtFirstDigit_Copy2" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="130" Margin="167,55,0,192" />
<Button x:Name="button" Content="Next" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="142,220,0,0"/>
<Button x:Name="button1" Content="Cancel" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="222,220,0,0" Click="button1_Click"/>
<TextBlock x:Name="textBlock" HorizontalAlignment="Left" TextWrapping="Wrap" Text="TextBlock" VerticalAlignment="Top" Margin="350,147,0,0"/>
</Grid>
</Window>
I'd try something like this:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
</Grid.RowDefinitions>
<Label x:Name="label_Copy1" Grid.Row="0" Content="First Name:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="23,0,0,0" />
<StackPanel Orientation="Horizontal" Grid.Row="1">
<TextBox x:Name="txtFirstDigit_Copy1" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="130" Margin="23,0,0,0" />
<TextBox x:Name="txtFirstDigit_Copy2" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="130" Margin="11.5,0,0,0" />
</StackPanel>
<Label x:Name="label_Copy" Grid.Row="2" Content="Email:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="23,0,0,0" />
<TextBox x:Name="txtFirstDigit_Copy" Grid.Row="3" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="270" Margin="23,0,0,0" />
<Label x:Name="label" Grid.Row="4" Content="Product key:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="23,0,0,0" />
<StackPanel Orientation="Horizontal" Grid.Row="5">
<TextBox x:Name="txtFirstDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="23,0,0,0" BorderThickness="1" />
<TextBox x:Name="txtSecondDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="11.5,0,0,0" />
<TextBox x:Name="txtThirdDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="11.5,0,0,0" />
<TextBox x:Name="txtFourthDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="11.5,0,0,0" />
<TextBox x:Name="txtFifthDigit" HorizontalAlignment="Left" Height="22" TextWrapping="Wrap" VerticalAlignment="Center" Width="45" Margin="11.5,0,0,0" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="6">
<Button x:Name="button" Content="Next" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="132,0,0,0" />
<Button x:Name="button1" Content="Cancel" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="11.5,0,0,0" />
</StackPanel>
</Grid>

Could not find windows runtime type windows.UI.Xaml.Tickbar

After running my program on my device I get the error Could not find windows runtime type windows.UI.Xaml.Tickbar in my xaml.
I have overlooked the Xaml many times but I can't see any error in it I hope the people from Stackoverflow can help me
The piece of xaml where the error is in:
<DataTemplate>
<ScrollViewer Height="543" Margin="0,0,-0.167,0" HorizontalScrollMode="Disabled" VerticalScrollMode="Auto" >
<Grid Height="708" Name="ProfileContent">
<Image x:Name="ProfileImage" HorizontalAlignment="Left" Height="149" Margin="10,10,0,0" VerticalAlignment="Top" Width="143" Source="{Binding image}" Stretch="Fill"/>
<Button x:Name="BtnChangePic" Content="Change" HorizontalAlignment="Left" Margin="175,0,0,0" VerticalAlignment="Top" Click="BtnChangePic_Click" Width="156" x:Uid="BtnChangePic"/>
<TextBox HorizontalAlignment="Left" Margin="109,180,0,0" TextWrapping="Wrap" Text="{Binding name, Mode=TwoWay}" VerticalAlignment="Top" Width="222"/>
<TextBlock x:Name="TBlockName" HorizontalAlignment="Left" Margin="10,195,0,0" TextWrapping="Wrap" x:Uid="TBlockName" Text="Name" VerticalAlignment="Top" FontSize="20"/>
<TextBox HorizontalAlignment="Left" Margin="109,224,0,0" TextWrapping="Wrap" Text="{Binding location[4], Mode=TwoWay}" VerticalAlignment="Top" Width="222" Height="39"/>
<TextBlock x:Name="TBlockLand" HorizontalAlignment="Left" Margin="10,245,0,0" TextWrapping="Wrap" Text="Land" VerticalAlignment="Top" FontSize="20" x:Uid="TBlockLand"/>
<Button x:Name="BtnImgDel" Content="Delete" HorizontalAlignment="Left" Margin="175,62,0,0" VerticalAlignment="Top" Click="BtnImgDel_Click" Width="156" x:Uid="BtnImgDel"/>
<TextBlock x:Name="Seo_name" HorizontalAlignment="Left" Margin="289,10,0,0" TextWrapping="Wrap" Text="{Binding seo_name}" VerticalAlignment="Top" Opacity="0"/>
<TextBox HorizontalAlignment="Left" Margin="109,268,0,0" TextWrapping="Wrap" Text="{Binding location[3], Mode=TwoWay}" VerticalAlignment="Top" Width="222" Height="39"/>
<TextBox HorizontalAlignment="Left" Margin="109,312,0,0" TextWrapping="Wrap" Text="{Binding location[2], Mode=TwoWay}" VerticalAlignment="Top" Width="222" Height="39"/>
<TextBlock x:Name="TBlockProvincie" HorizontalAlignment="Left" Margin="10,289,0,0" TextWrapping="Wrap" Text="Provincie" VerticalAlignment="Top" FontSize="20" x:Uid="TBlockProvincie"/>
<TextBlock x:Name="TBlockCity" HorizontalAlignment="Left" Margin="10,327,0,0" TextWrapping="Wrap" Text="Stad" VerticalAlignment="Top" FontSize="20" x:Uid="TBlockCity"/>
<TextBlock x:Name="TBlockStreet" HorizontalAlignment="Left" Margin="10,371,0,0" TextWrapping="Wrap" Text="Straat" VerticalAlignment="Top" FontSize="20" x:Uid="TBlockStreet"/>
<TextBox HorizontalAlignment="Left" Margin="109,356,0,0" TextWrapping="Wrap" Text="{Binding location[1], Mode=TwoWay}" VerticalAlignment="Top" Width="222" Height="39"/>
<TextBlock x:Name="TBlockHouseNumber" HorizontalAlignment="Left" Margin="10,400,0,0" TextWrapping="Wrap" Text="Huisnummer" VerticalAlignment="Top" FontSize="20" Width="94"/>
<TextBox HorizontalAlignment="Left" Margin="109,400,0,0" TextWrapping="Wrap" Text="{Binding location[0], Mode=TwoWay}" VerticalAlignment="Top" Width="222" Height="39" x:Uid="TBlockHouseNumber"/>
<TextBlock HorizontalAlignment="Left" Margin="10,459,0,0" TextWrapping="Wrap" Text="Telefoon" VerticalAlignment="Top" FontSize="20"/>
<TextBox HorizontalAlignment="Left" Margin="109,444,0,0" TextWrapping="Wrap" Text="{Binding phone, Mode=TwoWay}" VerticalAlignment="Top" Width="222" Height="39"/>
<TextBlock x:Name="TBlockHide" HorizontalAlignment="Left" Margin="10,500,0,0" TextWrapping="Wrap" Text="Verbergen" VerticalAlignment="Top" FontSize="20" x:Uid="TBlockHide"/>
<CheckBox Content="" HorizontalAlignment="Left" Margin="116,484,0,0" VerticalAlignment="Top" Height="55" IsChecked="{Binding hidephone, Mode=TwoWay}"/>
<Button x:Name="BtnSaveProfile" Content="Button" HorizontalAlignment="Left" Margin="10,551,0,0" VerticalAlignment="Top" Width="321"/>
</Grid>
</ScrollViewer>
</DataTemplate>
Thank you
Found the error in my Xaml after deleting all the X:Uid codes the problems was fixed.
Thank you Physikbuddha for helping

WPF Labels 2-n in StackPanel not visible

I am going through the tutorial here and for whatever reason, the labels for FirstName, LastName, and City are not visible, neither at design time nor at runtime. I've tried deleting them and re-adding and I get the same result. Can anyone see what is causing them to be hidden?
<Grid Margin="0,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="73*"/>
<RowDefinition Height="247*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="259*"/>
<ColumnDefinition Width="258*"/>
</Grid.ColumnDefinitions>
<Button x:Name="btnSave" Content="Save" Grid.Column="1" HorizontalAlignment="Right" Margin="0,10,10,0" Width="60" Height="22" VerticalAlignment="Top"/>
<Button x:Name="btnRevert" Content="Revert" Grid.Column="1" HorizontalAlignment="Right" Margin="0,10,86,0" Width="60" RenderTransformOrigin="-0.047,0.36" Height="22" VerticalAlignment="Top"/>
<Button x:Name="btnAdd" Content="Add" Grid.Column="1" HorizontalAlignment="Right" Margin="0,10,162,0" VerticalAlignment="Top" Width="60"/>
<Button x:Name="btnDelete" Content="Delete" HorizontalAlignment="Right" Margin="0,10,238,0" VerticalAlignment="Top" Width="60" RenderTransformOrigin="-1.521,0.477" Grid.Column="1"/>
<Button x:Name="btnFirst" Content="|<" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="35"/>
<Button x:Name="btnFirst_Copy" Content="|<" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="35"/>
<Button x:Name="btnPrevious" Content="<" HorizontalAlignment="Left" Margin="54,10,0,0" VerticalAlignment="Top" Width="35"/>
<Button x:Name="btnNext" Content=">" HorizontalAlignment="Left" Margin="94,10,0,0" VerticalAlignment="Top" Width="35"/>
<Button x:Name="btnLast" Content=">|" HorizontalAlignment="Left" Margin="134,10,0,0" VerticalAlignment="Top" Width="35" RenderTransformOrigin="4.102,1.005"/>
<StackPanel HorizontalAlignment="Left" Height="28" Grid.Row="1" VerticalAlignment="Top" Width="304">
<Label x:Name="lblCustomerID" Content="Customer ID" Height="28"/>
<Label x:Name="lblFirstName" Content="First Name" Height="28"/>
<Label x:Name="lblLastName" Content="Last Name" Height="28"/>
<Label x:Name="lblCity1" Content="City" Height="28"/>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Left" Height="251" Grid.Row="1" VerticalAlignment="Top" Width="297">
<TextBox x:Name="txtCustomerID" Height="28" TextWrapping="Wrap" Width="Auto" Text="{Binding Path=CustomerID, Mode=OneWay}"/>
<TextBox x:Name="txtLastName" Height="28" TextWrapping="Wrap" Width="Auto" Text="{Binding Path=LastName}"/>
<TextBox x:Name="txtFirstName" Height="28" TextWrapping="Wrap" Width="Auto" Text="{Binding Path=FirstName}"/>
<TextBox x:Name="txtCity" Height="28" TextWrapping="Wrap" Width="Auto" Text="{Binding Path=City}"/>
</StackPanel>
</Grid>
Remove your StackPanel's Height. Let it fill its height automatically. You set it to 28 which makes the other children get cutted off.
<StackPanel HorizontalAlignment="Left" Grid.Row="1" VerticalAlignment="Top" Width="304">
<Label x:Name="lblCustomerID" Content="Customer ID" Height="28"/>
<Label x:Name="lblFirstName" Content="First Name" Height="28"/>
<Label x:Name="lblLastName" Content="Last Name" Height="28"/>
<Label x:Name="lblCity1" Content="City" Height="28"/>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Left" Grid.Row="1" VerticalAlignment="Top" Width="297">
<TextBox x:Name="txtCustomerID" Height="28" TextWrapping="Wrap" Width="Auto" Text="{Binding Path=CustomerID, Mode=OneWay}"/>
<TextBox x:Name="txtLastName" Height="28" TextWrapping="Wrap" Width="Auto" Text="{Binding Path=LastName}"/>
<TextBox x:Name="txtFirstName" Height="28" TextWrapping="Wrap" Width="Auto" Text="{Binding Path=FirstName}"/>
<TextBox x:Name="txtCity" Height="28" TextWrapping="Wrap" Width="Auto" Text="{Binding Path=City}"/>
</StackPanel>

Custom user control looks different when added to window

I created a custom user control, and it looks like this:
XAML for the control is:
<Grid>
<Label Content="Job #" Height="28" HorizontalAlignment="Left" Margin="6,14,0,0" Name="label1" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="48" HorizontalContentAlignment="Right" />
<Label Content="Customer" Height="28" HorizontalAlignment="Left" Margin="6,41,0,0" Name="label2" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="48" HorizontalContentAlignment="Right" />
<Label Content="Location" Height="28" HorizontalAlignment="Left" Margin="6,68,0,0" Name="label3" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="48" HorizontalContentAlignment="Right" />
<Label Content="Crossing" Height="28" HorizontalAlignment="Left" Margin="6,95,0,0" Name="label4" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="48" HorizontalContentAlignment="Right" />
<Label Content="Engineer" Height="28" HorizontalAlignment="Left" Margin="6,122,0,0" Name="label5" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="48" HorizontalContentAlignment="Right" />
<Label Content="Probe #" Height="28" HorizontalAlignment="Left" Margin="6,149,0,0" Name="label6" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="48" HorizontalContentAlignment="Right" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="53,14,0,0" Name="lblJob" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="53,41,0,0" Name="lblCustomer" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="53,68,0,0" Name="lblLocation" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="53,95,0,0" Name="lblCrossing" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="53,122,0,0" Name="lblEngineer" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="53,149,0,0" Name="lblProbe" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Away" Height="28" HorizontalAlignment="Left" Margin="204,41,0,0" Name="label14" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="55" />
<Label Content="Elevation" Height="28" HorizontalAlignment="Left" Margin="204,68,0,0" Name="label15" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="55" />
<Label Content="Right" Height="28" HorizontalAlignment="Left" Margin="204,95,0,0" Name="label16" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="55" />
<Label Content="Inclination" Height="28" HorizontalAlignment="Left" Margin="204,122,0,0" Name="label17" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="55" />
<Label Content="Baseline" Height="28" HorizontalAlignment="Left" Margin="204,149,0,0" Name="label18" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="55" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="258,41,0,0" Name="lblAway" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="258,68,0,0" Name="lblElevation" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="258,95,0,0" Name="lblRight" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="258,122,0,0" Name="lblInclination" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="258,149,0,0" Name="lblBaseline" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Entry" Height="28" HorizontalAlignment="Left" Margin="338,12,0,0" Name="label13" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="40" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="377,12,0,0" Name="lblEntry" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Exit" Height="28" HorizontalAlignment="Left" Margin="521,12,0,0" Name="label25" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="40" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="560,12,0,0" Name="lblExit" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<Label Content="Units" Height="28" HorizontalAlignment="Left" Margin="706,12,0,0" Name="label27" Style="{StaticResource MyLabel2}" VerticalAlignment="Top" Width="40" />
<Label Content="Default" Height="28" HorizontalAlignment="Left" Margin="745,12,0,0" Name="lblUnits" Style="{StaticResource MyLabel3}" VerticalAlignment="Top" Width="120" />
<DataGrid AutoGenerateColumns="True" Height="275" Margin="12,186,0,0" Name="dataGrid1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="849" />
</Grid>
Yet, when I add it to the window that it's going to be in, it looks like this:
XAML for the Window is:
<Grid>
<SurveyReport:SurveyReport Margin="0,12,0,0" Height="727" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1425" />
</Grid>
Now, when I run the program, it appears the way that it should. But in the designer, it looks all messed up. All my other custom controls look the way that they should. It's just this one that is giving me issues. Is there a reason for this?

Overlapping Grids inside a Tab

I have two grids inside a TabItem and in the code-behind I want to be able to add controls to both grids and have all the controls visible at run-time. Currently at run-time the controls added to "Grid3" are not visible while he controls added to "Grid4" are visible.
The overlapping grids have the same rows but a different set of columns.
I'm trying to do this with two grids so that I can vary the number of controls I can add per row in the code-behind by adding the controls to one of the two grids.
Here's the XML:
<Grid Name="TabControlGrid" Margin="20,171,0,70">
<TabControl >
<TabItem Header="Tab1" >
<Grid Name="InnerTabControlGrid">
<!--Start Grid3-->
<Grid Name="Grid3" Background="#FFE3EFFF" Height="188">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="98*" />
<ColumnDefinition Width="296*" />
<ColumnDefinition Width="88*" />
<ColumnDefinition Width="327*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="10*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="30*" />
</Grid.RowDefinitions>
<Grid Name="InnerGrid3" Grid.ColumnSpan="4" Grid.RowSpan="8" VerticalAlignment="Top" HorizontalAlignment="Left" Width="807">
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="TextBlock1" Text="Row 1, Col 1" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,35,0,0" Name="TextBlock2" Text="Row 2, Col 1" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,60,0,0" Name="TextBlock3" Text="Row 3, Col 1" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,85,0,0" Name="TextBlock4" Text="Row 4, Col 1" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,110,0,0" Name="TextBlock5" Text="Row 5, Col 1" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,135,0,0" Name="TextBlock6" Text="Row 6, Col 1" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,160,0,0" Name="TextBlock7" Text="Row 7, Col 1" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="405,10,0,0" Name="TextBlock8" Text="Row 1, Col 2" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="405,35,0,0" Name="TextBlock9" Text="Row 2, Col 2" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="405,60,0,0" Name="TextBlock10" Text="Row 3, Col 2" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="405,85,0,0" Name="TextBlock11" Text="Row 4, Col 2" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="405,110,0,0" Name="TextBlock12" Text="Row 5, Col 2" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="403,135,0,0" Name="TextBlock13" Text="Row 6, Col 2:" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="403,160,0,0" Name="TextBlock14" Text="Row 7, Col 2" VerticalAlignment="Top" Width="71" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="98,11,0,0" Name="ComboBox9" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,10,0,0" Name="ComboBox10" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="98,35,0,0" Name="ComboBox11" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,35,0,0" Name="ComboBox12" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="98,60,0,0" Name="ComboBox13" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,60,0,0" Name="ComboBox14" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="98,85,0,0" Name="ComboBox15" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,85,0,0" Name="ComboBox16" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="98,110,0,0" Name="ComboBox17" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,111,0,0" Name="ComboBox18" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="98,135,0,0" Name="ComboBox19" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,136,0,0" Name="ComboBox20" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="98,160,0,0" Name="ComboBox21" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,160,0,0" Name="ComboBox22" VerticalAlignment="Top" Width="291" Visibility="Collapsed"/>
</Grid>
</Grid>
<!--End Grid3-->
<Grid Name="Grid4" Background="#FFE3EFFF">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="97*" />
<ColumnDefinition Width="102*" />
<ColumnDefinition Width="91*" />
<ColumnDefinition Width="102*" />
<ColumnDefinition Width="87*" />
<ColumnDefinition Width="102*" />
<ColumnDefinition Width="99*" />
<ColumnDefinition Width="125*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="10*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="26*" />
<RowDefinition Height="30*" />
</Grid.RowDefinitions>
<Grid Name="InnerGrid4" Grid.ColumnSpan="8" Grid.RowSpan="8" VerticalAlignment="Top" HorizontalAlignment="Left" Width="803" Height="193">
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="TextBlock15" Text="Row 1, Col 1" VerticalAlignment="Top" Width="73" Visibility="Collapsed" />
<TextBox BorderBrush="#FF898C95" Height="23" HorizontalAlignment="Left" Margin="98,11,0,0" Name="TextBox13a" VerticalAlignment="Top" Width="100" Visibility="Collapsed" />
<TextBlock Height="23" HorizontalAlignment="Left" Margin="210,10,0,0" Name="TextBlock16" Text="Row 1, Col 2" VerticalAlignment="Top" Width="73" Visibility="Collapsed" />
<TextBox BorderBrush="#FF898C95" Height="23" HorizontalAlignment="Left" Margin="289,11,0,0" Name="TextBox14a" VerticalAlignment="Top" Width="100" Visibility="Collapsed" />
<TextBlock Height="23" HorizontalAlignment="Left" Margin="410,12,0,0" Name="TextBlock17" Text="Row 1, Col 3" VerticalAlignment="Top" Width="67" Visibility="Collapsed" />
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,10,0,0" Name="ComboBox23" VerticalAlignment="Top" Width="100" Visibility="Collapsed" />
<TextBlock Height="23" HorizontalAlignment="Left" Margin="600,14,0,0" Name="TextBlock18" Text="Row 1, Col 4" VerticalAlignment="Top" Width="71" Visibility="Collapsed" />
<TextBox BorderBrush="#FF898C95" Height="23" HorizontalAlignment="Left" Margin="680,11,0,0" Name="TextBox18a" VerticalAlignment="Top" Width="100" Visibility="Collapsed" />
<TextBlock Height="23" HorizontalAlignment="Left" Margin="10,35,0,0" Name="TextBlock19" Text="Row 2, Col 1" VerticalAlignment="Top" Visibility="Collapsed" Width="73" />
<TextBox BorderBrush="#FF898C95" Height="23" HorizontalAlignment="Left" Margin="98,36,0,0" Name="TextBox1" VerticalAlignment="Top" Visibility="Collapsed" Width="100" />
<TextBlock Height="23" HorizontalAlignment="Left" Margin="210,35,0,0" Name="TextBlock20" Text="Row 2, Col 2" VerticalAlignment="Top" Visibility="Collapsed" Width="73" />
<TextBox BorderBrush="#FF898C95" Height="23" HorizontalAlignment="Left" Margin="289,36,0,0" Name="TextBox2" VerticalAlignment="Top" Visibility="Collapsed" Width="100" />
<TextBlock Height="23" HorizontalAlignment="Left" Margin="410,37,0,0" Name="TextBlock21" Text="Row 2, Col 3" VerticalAlignment="Top" Visibility="Collapsed" Width="67" />
<ComboBox Height="23" HorizontalAlignment="Left" Margin="479,35,0,0" Name="ComboBox24" VerticalAlignment="Top" Visibility="Collapsed" Width="100" />
<TextBlock Height="23" HorizontalAlignment="Left" Margin="600,39,0,0" Name="TextBlock22" Text="Row 2, Col 4" VerticalAlignment="Top" Visibility="Collapsed" Width="71" />
<TextBox BorderBrush="#FF898C95" Height="23" HorizontalAlignment="Left" Margin="680,36,0,0" Name="TextBox3" VerticalAlignment="Top" Visibility="Collapsed" Width="100" />
</Grid>
</Grid>
</Grid>
</TabItem>
<TabItem Header="Tab2" >
</TabItem>
</TabControl>
</Grid>
The controls in the XML are just place holders for the controls I am adding to the grids in the code-behind.
If anyone can suggest a solution I'd appreciate it.
Thanks!
-mg
Remove the background from the grid. You can not see through a solid color.
Your InnerTabControlGrid does not define any Row or Column Definitions, so both child grids are placed on top of each other in a single grid cell.
Change InnerTabControlGrid to a DockPanel or a UniformGrid, or give it some Grid.ColumnDefinitions or Grid.RowDefinitions and assign your child grid's Grid.Column or Grid.Row

Resources