2
Vote

Control does not work with light theme

description

controls and text in the notificationbox are not displayed correctly when the light theme is selected in the phone. This could mean a failed certification for the app.

comments

rruggeri wrote Apr 1, 2012 at 6:27 PM

Changes I made to make it work:
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="controls:NotificationBox">
                <Border Background="{StaticResource PhoneBackgroundBrush}" d:DesignWidth="312" d:DesignHeight="464">
                    <Border x:Name="border" Background="{StaticResource PhoneBackgroundBrush}" VerticalAlignment="Top">
                        <Grid Margin="24,40,24,0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="60"/>
                                <RowDefinition Height="Auto" />
                                <RowDefinition/>
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>

                            <TextBlock Text="{TemplateBinding Title}" VerticalAlignment="Center" Margin="0,0,0,2" FontSize="32" Foreground="{StaticResource PhoneForegroundBrush}" />
                            <TextBlock Text="{TemplateBinding Message}" TextWrapping="Wrap" Grid.Row="1" Margin="0,2,0,2" FontSize="22" Foreground="{StaticResource PhoneForegroundBrush}" />

                            <ItemsPresenter Grid.Row="2" Margin="0,2,0,8" />

                            <CheckBox IsChecked="{Binding ShowAgainOption, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                                Visibility="{TemplateBinding ShowAgainVisibility}"
                                Content="{TemplateBinding ShowAgainText}"
                                Grid.Row="3"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Left" Foreground="{StaticResource PhoneForegroundBrush}" />

                        </Grid>
                    </Border>                        
                </Border>
            </ControlTemplate>
        </Setter.Value>            
    </Setter>

wrote Jul 30, 2012 at 11:36 PM

wrote Feb 14, 2013 at 6:25 PM