WPF XAML does not render

0

I'm having problem with the view only rendering normally when I enter the ResourceDictionary in the resources of the same, but when I enter the ResourceDictionary in the resources of App.xaml the view in question does not render there are no error messages in the Visual Studio output. Has anyone had this problem and know how to fix it?

ResourceDictionary content I'm changing the style of the Telerik Wizard control:

 <telerik:DoubleToThicknessConverter x:Key="DoubleToThicknessConverter"/>

 

    <ControlTemplate x:Key="WizardPageTemplate" TargetType="{x:Type telerik:WizardPage}">
        <Border Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <Border x:Name="PART_SideHeaderBorder"
                        Grid.RowSpan="2"
                        Background="#FFFFFFFF"
                        BorderBrush="#FF333333"
                        BorderThickness="{Binding SideHeaderBorderWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoubleToThicknessConverter}, ConverterParameter=Right}"
                        Width="{Binding SideHeaderWidth, RelativeSource={RelativeSource TemplatedParent}}"
                        Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsSideHeaderVisible, Converter={StaticResource BooleanToVisibilityConverter}}">

                    <ContentPresenter x:Name="PART_SideHeaderPresenter"
                                      Margin="{TemplateBinding Padding}"
                                      Content="{TemplateBinding SideHeader}"
                                      TextBlock.Foreground="{TemplateBinding Foreground}"
                                      ContentTemplate="{TemplateBinding SideHeaderTemplate}"
                                      TextBlock.FontSize="{telerik:Windows8TouchResource ResourceKey=FontSizeL}"
                                      TextBlock.FontFamily="{telerik:Windows8TouchResource ResourceKey=FontFamily}"/>
                </Border>

                <Border x:Name="PART_HeaderBorder"
                        Grid.Column="1"
                        Grid.ColumnSpan="1"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{Binding HeaderBorderWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoubleToThicknessConverter}, ConverterParameter=Bottom}"
                        Height="{Binding HeaderHeight, RelativeSource={RelativeSource TemplatedParent}}">

                    <Grid Margin="{TemplateBinding Padding}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="auto"/>
                        </Grid.RowDefinitions>

                        <TextBlock x:Name="PART_PageTitle"
                                   Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}"
                                   TextWrapping="Wrap"
                                   FontFamily="{telerik:Windows8TouchResource ResourceKey=FontFamily}"
                                   FontSize="{telerik:Windows8TouchResource ResourceKey=FontSizeXL}"
                                   FontWeight="Bold"
                                   Foreground="{TemplateBinding Foreground}"
                                   Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsTitleVisible, Converter={StaticResource BooleanToVisibilityConverter}}"/>

                        <ContentPresenter x:Name="PART_HeaderPresenter"
                                          Grid.Row="1"
                                          Content="{TemplateBinding Header}"
                                          ContentTemplate="{TemplateBinding HeaderTemplate}"
                                          TextBlock.Foreground="{TemplateBinding Foreground}"
                                          Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsHeaderVisible, Converter={StaticResource BooleanToVisibilityConverter}}"
                                          TextBlock.FontSize="{telerik:Windows8TouchResource ResourceKey=FontSizeL}"
                                          TextBlock.FontFamily="{telerik:Windows8TouchResource ResourceKey=FontFamily}"/>
                    </Grid>
                </Border>

                <ContentPresenter x:Name="PART_PagePresenter"
                                  Grid.Row="1"
                                  Grid.Column="1"
                                  Content="{TemplateBinding Content}"
                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                  TextBlock.Foreground="{TemplateBinding Foreground}"
                                  Margin="{TemplateBinding Padding}"
                                  TextBlock.FontFamily="Segoe UI"/>

                <Border x:Name="PART_FooterBorder"
                        Grid.Row="2"
                        Grid.ColumnSpan="2"
                        BorderThickness="{Binding FooterBorderWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource DoubleToThicknessConverter}, ConverterParameter=Top}"
                        MinHeight="48"
                        BorderBrush="#FF333333"
                        Background="#FFFFFFFF">

                    <ContentControl x:Name="PART_FooterContentControl"
                                    Margin="{TemplateBinding Padding}"
                                    ContentTemplate="{TemplateBinding FooterTemplate}"
                                    VerticalContentAlignment="Center"
                                    HorizontalContentAlignment="Stretch"/>
                </Border>
            </Grid>
        </Border>
    </ControlTemplate>

    <DataTemplate x:Key="FooterTemplate">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <telerik:RadButton x:Name="PART_Help"
                Content="{Binding HelpButtonContent, Mode=TwoWay}"
                MinHeight="36"
                Margin="9,0,0,0"
                MinWidth="78"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                Visibility="{Binding NavigationButtonsVisibility.HelpButtonVisibility}"
                Command="{x:Static telerik:RadWizardCommands.Help}"/>

            <StackPanel Grid.Column="1" 
                        VerticalAlignment="Center" 
                        Orientation="Horizontal"
                        HorizontalAlignment="Right">
                <telerik:RadButton x:Name="PART_Previous"
                    Content="{Binding PreviousButtonContent, Mode=TwoWay}"
                    MinHeight="36"
                    MinWidth="78"
                    VerticalAlignment="Center"
                    Visibility="{Binding NavigationButtonsVisibility.PreviousButtonVisibility}"
                    Command="{x:Static telerik:RadWizardCommands.MoveCurrentToPrevious}"/>

                <telerik:RadButton x:Name="PART_Next"
                    Content="{Binding NextButtonContent, Mode=TwoWay}"
                    Margin="8,0,0,0"
                    Visibility="{Binding NavigationButtonsVisibility.NextButtonVisibility}"
                    MinHeight="36"
                    VerticalAlignment="Center"
                    MinWidth="78"
                    Command="{x:Static telerik:RadWizardCommands.MoveCurrentToNext}"/>

                <telerik:RadButton x:Name="PART_Finish"
                    Content="{Binding FinishButtonContent, Mode=TwoWay}"
                    Margin="8,0,0,0"
                    MinHeight="36"
                    MinWidth="78"
                    VerticalAlignment="Center"
                    Visibility="{Binding NavigationButtonsVisibility.FinishButtonVisibility}"
                    Command="{x:Static telerik:RadWizardCommands.Finish}"/>

                <telerik:RadButton x:Name="PART_Cancel"
                    Content="{Binding CancelButtonContent, Mode=TwoWay}"
                    Margin="8,0,0,0"
                    VerticalAlignment="Center"
                    MinHeight="36"
                    MinWidth="78"
                    Visibility="{Binding NavigationButtonsVisibility.CancelButtonVisibility}"
                    Command="{x:Static telerik:RadWizardCommands.Cancel}"/>
            </StackPanel>
        </Grid>
    </DataTemplate>

    <Style x:Key="WizardPageStyle" TargetType="{x:Type telerik:WizardPage}">
        <Setter Property="Template" Value="{StaticResource WizardPageTemplate}"/>
        <Setter Property="FooterTemplate" Value="{StaticResource FooterTemplate}"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Padding" Value="10,9"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="HeaderHeight" Value="40"/>
    </Style>

    <ControlTemplate x:Key="RadWizardTemplate" TargetType="{x:Type telerik:RadWizard}">
        <Border Background="{TemplateBinding Background}" 
                BorderBrush="{TemplateBinding BorderBrush}" 
                BorderThickness="{TemplateBinding BorderThickness}">
            <Grid>
                <ContentPresenter x:Name="PART_SelectedPagePresenter" 
                                  Content="{Binding SelectedPage, RelativeSource={RelativeSource TemplatedParent}}"
                                  Visibility="{Binding Path=IsContentPreserved, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"/>
                <Grid x:Name="ContentElementsPanel" Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsContentPreserved, Converter={StaticResource BooleanToVisibilityConverter}}"/>
            </Grid>
        </Border>
    </ControlTemplate>

    <Style TargetType="{x:Type telerik:WizardPage}" BasedOn="{StaticResource WizardPageStyle}"/>
    <Style TargetType="{x:Type telerik:CompletionWizardPage}" BasedOn="{StaticResource WizardPageStyle}"/>
    <Style TargetType="{x:Type telerik:WelcomeWizardPage}" BasedOn="{StaticResource WizardPageStyle}"/>

    <Style TargetType="{x:Type telerik:RadWizard}">
        <Setter Property="Template" Value="{StaticResource RadWizardTemplate}"/>
        <Setter Property="Background" Value="#FFFFFFFF"/>
        <Setter Property="BorderBrush" Value="#FF333333"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="#FF333333"/>
        <Setter Property="FontFamily" Value="Segoe UI"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
    </Style>
    
asked by anonymous 08.04.2016 / 16:04

0 answers