This question is locked. New answers and comments are not allowed.
Hi,
I'm trying to make one custom controller that extends the RadWindow. This controller will have 2 different zones: 1 is the content and the second one footer.
So, to do this, i tried to change the dataTemplate of the content.
The code above is the just with the content with one button (marking the area of the footer).
Then in mainpage i call this dialog and add one button to the content:
The strange thing (at least for me!!) is when in the code-behind of the mainWindow (c#) if i try to call the "buttontoDisable" (say for example disable it), gives to me a "System.NullReferenceException".
What i'm doing wrong here?
I'm trying to make one custom controller that extends the RadWindow. This controller will have 2 different zones: 1 is the content and the second one footer.
So, to do this, i tried to change the dataTemplate of the content.
| <telerik:RadWindow.Resources> |
| <ResourceDictionary> |
| <DataTemplate x:Key="ChangedTemplate"> |
| <Grid> |
| <Grid.RowDefinitions> |
| <RowDefinition Height="*"/> |
| <RowDefinition Height="60"/> |
| </Grid.RowDefinitions> |
| <ContentPresenter Grid.Row="0" Content="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"/> |
| <Button Grid.Row="1" Content="ola"/> |
| </Grid> |
| </DataTemplate> |
| <Style TargetType="local:Dialog"> |
| <Setter Property="ContentTemplate" Value="{StaticResource ChangedTemplate}"/> |
| </Style> |
| </ResourceDictionary> |
| </telerik:RadWindow.Resources> |
Then in mainpage i call this dialog and add one button to the content:
| <my3:Dialog x:Name="xdialog" BorderBackground="#FF121010" |
| Background="Lime" BorderBrush="Blue" BorderThickness="1" |
| WindowStartupLocation="CenterScreen" Opacity="10" Header="This is popup" |
| DialogResult="True"> |
| <StackPanel> |
| <TelerikControl:RadButton x:Name="buttontoDisable" Height="50" Width="50" Content="TryIt"/> |
| </StackPanel> |
| </my3:Dialog> |
The strange thing (at least for me!!) is when in the code-behind of the mainWindow (c#) if i try to call the "buttontoDisable" (say for example disable it), gives to me a "System.NullReferenceException".
What i'm doing wrong here?