oc A

oc A

  • NA
  • 30
  • 0

OpacityMask Property

Dec 2 2011 2:27 AM

Hi
In my SilverLight Application , I ve a UserControl

<UserControl x:Class="MyUserControlApp.TransparentLayer"
    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" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:my="clr-namespace:C1.Silverlight.Imaging;assembly=C1.Silverlight.Imaging" xmlns:my1="clr-namespace:MyUserControlApp">

    <Grid x:Name="LayoutRoot"  Background="White"  >       
        <Grid.OpacityMask>
            <RadialGradientBrush GradientOrigin="1,0">
                <GradientStop Color="#AE000000" Offset="0.0" />
                <GradientStop Color="#AE000000" Offset="0.25" />
                <GradientStop Color="#AE000000" Offset="0.75" />
                <GradientStop Color="#AE000000" Offset="1.0" />
            </RadialGradientBrush>
        </Grid.OpacityMask>      
            <my:C1Image Height="54" HorizontalAlignment="Left" Margin="6,0,0,0" Name="c1Image1" VerticalAlignment="Top" Width="78" Source="/ajax_loading.gif"/>
      
    </Grid>
</UserControl>

I also have a ChildWindow named MyChildWindow.xaml which has a button and the above UserControl in it. On button click, i am making the usercontrol visible.
THe problem is , when the usercontrol goes visible, the image is blurred.
What can be the reson for this? Am i doing anything wrong in the UserControl XAML.