CUI interface

Feb 2, 2014 at 4:59 PM
Dear Sir:
Thank you for providing such a great product. When I try to apply, there is an error, please help me, thank you!

Main problems are as follows:

namespace:
xmlns:Controls="clr-namespace:Microsoft.Cui.Controls;assembly=Microsoft.Cui.Controls"
xmlns:local="clr-namespace:Nhs.Cui.Futures.Demonstrator.Controls;assembly=Nhs.Cui.Futures.Demonstrator.Controls"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
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"

XAML Code:
<Grid x:Name="LayoutRoot" >
<local:DockPanelContainer x:Name="dockPanelContainer1"  Margin="0, 5, 0, 5">
    <local:DockPanel x:Name="adminDockPanel1" Height="813" IsTabStop="False" Margin="5, 5, 5, 5" MinHeight="50" MinWidth="100" Width="275">
        <local:DockPanel.HeaderTemplate>
            ......
        </local:DockPanel.HeaderTemplate>
        <StackPanel>
            <TextBox x:Name="txtTest"></TextBox>
            <Button x:Name="btnTest" Click="BtnTest_Click"></Button>
        </StackPanel>
    </local:DockPanel>
   </local:DockPanelContainer>
</Grid>

Back code:
void BtnTest_Click(object sender, RoutedEventArgs e)
{
    this.txtTest.Text = "Hello!";
}
When F5,Then click button "BtnTest",Error occurred:
NullReferenceException,means TextBox must be instantiated.but textbox named txtTest Is dragged from the Toolbox to the interface。