Hi,
I'm trying to extend Docking Controls in Telerik. However, before adding new features, just changing namespaces causes exceptions.
As an example, although i can get events of child components in RadPane, I cannot access them without casting.
Xaml:
<myDocks:myDockPanel Width="350" Height="280" x:Name="panel" Loaded="panel_Loaded" >
<myDocks:myDocking x:Name="docking" Width="345" Height="275" Loaded="docking_Loaded" >
<myDocks:mySplitContainer Width="250" Height="250" x:Name="split" Loaded="split_Loaded" >
<myDocks:myPaneGroup x:Name="paneGroup" Width="245" Height="235" Loaded="paneGroup_Loaded" >
<myDocks:myPane Header="Pane 1" x:Name="pane1" Loaded="pane1_Loaded">
<StackPanel x:Name="stack">
<TextBlock x:Name="txtRandomNumber" FontSize="36" Text="SetNumber" HorizontalAlignment="Center" Margin="5"/>
<Button x:Name="btnRandomGenerator" Width="100" Height="35" Content="Random" Click="btnRandomGenerator_Click"/>
</StackPanel>
</myDocks:myPane>
<myDocks:myPane Header="Pane 2" x:Name="pane2"/>
</myDocks:myPaneGroup>
</myDocks:mySplitContainer>
</myDocks:myDocking>
</myDocks:myDockPanel>
CS:
private void btnRandomGeneratorR_Click(object sender, RoutedEventArgs e)
{
Random r = new Random();
txtRandomNumber.Text = r.Next(1, 9999).ToString(); /////this line throws exception that says txtRandomNumber is null
}
And my controls are extended similar to below:
<telerk:RadPane x:Class="myControls.myDocking.myPane"
xmlns:telerk="http://schemas.telerik.com/2008/xaml/presentation"
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"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
</telerk:RadPane>
What should I add or change for my extented controls to access their contents ?
Thanks