Opacity doesn't work

Apr 22, 2012 at 4:13 PM

Hi guys!

I'm having a problem concerning the opacity of my AdvancedApplicationBar.

This is my source-code:

<phone:PhoneApplicationPage 
    x:Class="GlowPro.KampfrechnerPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:GlowPro"
    xmlns:data="clr-namespace:GlowPro.Data"
    xmlns:Sh="clr-namespace:Sh;assembly=Sh"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.ForegroundColor="#00F9F9F9"
    shell:SystemTray.Opacity="0"
    shell:SystemTray.IsVisible="true">


    <phone:PhoneApplicationPage.Resources>
        <!-- BUDDIES RESOURCES -->
        <data:NPCsByAlphabet x:Key="buddies"/>

        <data:GroupToBrushValueConverter x:Key="groupBrush"/>
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush ImageSource="Backgrounds/KampfrechnerBackground.jpg" Stretch="UniformToFill" />
        </Grid.Background>
        
        <!--Pivot Control-->
        <controls:Pivot Title="GlowPro" x:Name="pvtCalculator" Margin="0,10,0,0">
            <!--Pivot item one-->
            <controls:PivotItem x:Name="pviCalc" Header="Rechner">
                <StackPanel>
            		<Button x:Name="btnChooseNPC" Content="W�hle gegnerischen NPC ..." Tap="btnChooseNPC_Tap"/>
            		<TextBlock x:Name="txbNameNPC" TextWrapping="Wrap" TextAlignment="Center" />
            		<Grid>
            			<Grid.RowDefinitions>
            				<RowDefinition/>
            				<RowDefinition/>
            				<RowDefinition/>
            				<RowDefinition/>
            				<RowDefinition/>
            				<RowDefinition/>
            				<RowDefinition/>
            				<RowDefinition/>
            			</Grid.RowDefinitions>
            			<Grid.ColumnDefinitions>
            				<ColumnDefinition/>
            				<ColumnDefinition/>
            			</Grid.ColumnDefinitions>
            			<TextBlock x:Name="txbAttacker" TextWrapping="Wrap" Text="Angreifer" VerticalAlignment="Top" HorizontalAlignment="Center"/>
            			<TextBlock x:Name="txbDefender" TextWrapping="Wrap" Text="Verteidiger" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Center"/>
            			<TextBlock x:Name="txbStrength" TextWrapping="Wrap" Text="Angriffst�rke" VerticalAlignment="Top" HorizontalAlignment="Center" Grid.Row="1" Grid.ColumnSpan="2"/>
                        <TextBox x:Name="txtOwnStrength" Grid.Column="0" Grid.Row="2" TextWrapping="Wrap" Margin="0" VerticalAlignment="Bottom" TextAlignment="Center" InputScope="NumberFullWidth" LostFocus="OnLostFocus_TrimInput"/>
                        <TextBox x:Name="txtEnemyStrength" Grid.Column="1" Grid.Row="2" TextWrapping="Wrap" Grid.ColumnSpan="2" Margin="0" VerticalAlignment="Bottom" TextAlignment="Center" InputScope="NumberFullWidth" LostFocus="OnLostFocus_TrimInput"/>
            			<TextBlock x:Name="txbDefense" TextWrapping="Wrap" Text="Verteidigung" VerticalAlignment="Top" HorizontalAlignment="Center" Grid.Row="3" Grid.ColumnSpan="2" d:LayoutOverrides="GridBox"/>
                        <TextBox x:Name="txtOwnDefense" Grid.Column="0" Grid.Row="4" TextWrapping="Wrap" Margin="0,0,0,-0.307" VerticalAlignment="Bottom" TextAlignment="Center" InputScope="NumberFullWidth" LostFocus="OnLostFocus_TrimInput"/>
                        <TextBox x:Name="txtEnemyDefense" Grid.Column="1" Grid.Row="4" TextWrapping="Wrap" Margin="0,0,0,0.386" VerticalAlignment="Bottom" d:LayoutOverrides="GridBox" TextAlignment="Center" InputScope="NumberFullWidth" LostFocus="OnLostFocus_TrimInput"/>
            			<TextBlock x:Name="txbHealth" TextWrapping="Wrap" Text="Lebenspunkte" VerticalAlignment="Top" HorizontalAlignment="Center" Grid.Row="5" Grid.ColumnSpan="2" d:LayoutOverrides="GridBox"/>
                        <TextBox x:Name="txtOwnHealth" Grid.Column="0" Grid.Row="6" TextWrapping="Wrap" Margin="0,0,0,-0.614" VerticalAlignment="Bottom" TextAlignment="Center" Grid.RowSpan="4" InputScope="NumberFullWidth" LostFocus="OnLostFocus_TrimInput"/>
                        <TextBox x:Name="txtEnemyHealth" Grid.Column="1" Grid.Row="6" TextWrapping="Wrap" Margin="0,0,0,0.079" VerticalAlignment="Bottom" TextAlignment="Center" d:LayoutOverrides="GridBox" InputScope="NumberFullWidth" LostFocus="OnLostFocus_TrimInput"/>
            		</Grid>
            		<TextBlock x:Name="txbResult" TextWrapping="Wrap" TextAlignment="Center"/>
            		<Button x:Name="btnFight" Content="Berechne Kampfausgang" Click="btnFight_Click" />
            	</StackPanel>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem x:Name="pviNPCs" Header="NPCs">
                <Grid>
                    <Sh:AdvancedApplicationBarIconButton x:Name="btnUpdateNPC" Text="Suche nach NPC-Updates" IconUri="Icons/UpdateNPC.png"/>

                <toolkit:LongListSelector x:Name="llsNPCs" Background="Transparent"
                    ItemsSource="{StaticResource buddies}" SelectionChanged="llsNPCs_SelectionChanged">

                    <toolkit:LongListSelector.GroupItemsPanel>
                        <ItemsPanelTemplate>
                            <toolkit:WrapPanel Orientation="Horizontal"/>
                        </ItemsPanelTemplate>
                    </toolkit:LongListSelector.GroupItemsPanel>
                    <toolkit:LongListSelector.GroupItemTemplate>
                        <DataTemplate>
                            <Border Background="{Binding Converter={StaticResource groupBrush}}" Width="99" Height="99" Margin="6" IsHitTestVisible="{Binding HasItems}">
                                <TextBlock Text="{Binding Key}" 
                                       FontFamily="{StaticResource PhoneFontFamilySemiBold}"
                                       FontSize="36"
                                       Margin="{StaticResource PhoneTouchTargetOverhang}"
                                       Foreground="{StaticResource PhoneForegroundBrush}"                                        
                                       VerticalAlignment="Bottom"/>
                            </Border>
                        </DataTemplate>
                    </toolkit:LongListSelector.GroupItemTemplate>

                    <toolkit:LongListSelector.GroupHeaderTemplate>
                        <DataTemplate>
                            <Border Background="Transparent">
                                <Border Background="{StaticResource PhoneAccentBrush}" Width="75" Height="75" HorizontalAlignment="Left" toolkit:TiltEffect.IsTiltEnabled="True">
                                    <TextBlock Text="{Binding Key}" 
                                           Foreground="{StaticResource PhoneForegroundBrush}" 
                                           Style="{StaticResource PhoneTextExtraLargeStyle}"
                                           VerticalAlignment="Bottom"/>
                                </Border>
                            </Border>
                        </DataTemplate>
                    </toolkit:LongListSelector.GroupHeaderTemplate>

                    <toolkit:LongListSelector.ItemTemplate>
                        <DataTemplate>
                            <Grid Margin="5,3,0,3" toolkit:TiltEffect.IsTiltEnabled="True">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Rectangle Width="15" Height="60" Fill="LightGreen" VerticalAlignment="Top"/>
                                <StackPanel Grid.Column="1" VerticalAlignment="Top">
                                    <TextBlock Text="{Binding Name}" Style="{StaticResource PhoneTextLargeStyle}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Margin="12,4,0,0" VerticalAlignment="Center"/>
                                </StackPanel>
                            </Grid>
                        </DataTemplate>
                    </toolkit:LongListSelector.ItemTemplate>

                </toolkit:LongListSelector>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
        
        <Sh:AdvancedApplicationBar Visibility="Visible" Opacity=".5" Mode="Minimized"/>
        
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>

As you can see, I've set the opacity to 0.5, but i still remains at 100% opacity.

I hope someome can help me with this problem?

Thanks in advance!