Hi. As i am trying to make one thing i need help with binding.
So, i have a user-control and a window. User control represents an ellipse with blurred image as ellipse fill and image with increased contrast as ellipse stroke.
User control source:
<Border x:Name="src" removed="Silver">
<Image Source="http://cs322217.vk.me/v322217001/8ceb/83F7vjpflls.jpg" Stretch="UniformToFill"></Image>
</Border>
<Border Margin="40">
<Grid>
<Ellipse>
<Ellipse.Effect>
<effects:BrightContrastEffect Brightness="0" Contrast="0.7"></effects:BrightContrastEffect>
</Ellipse.Effect>
<Ellipse.Fill>
<VisualBrush Visual="{Binding ElementName=src}" Stretch="None"></VisualBrush>
</Ellipse.Fill>
</Ellipse>
<Ellipse Margin="10">
<Ellipse.BitmapEffect>
<BlurBitmapEffect Radius="20" x:Name="blur"></BlurBitmapEffect>
</Ellipse.BitmapEffect>
<Ellipse.Fill>
<VisualBrush Visual="{Binding ElementName=src}" Stretch="None"></VisualBrush>
</Ellipse.Fill>
</Ellipse>
</Ellipse>
</Grid>
</Border>
Window:
<Grid>
<my:control></my:control>
</Grid>
and i have this result:
image of result[
^]
this is the effect what i need.
But. How i can achieve the same effect, if i set the image in window:
<Grid>
<Grid.Background>
<ImageBursh ImageSource="http://cs322217.vk.me/v322217001/8ceb/83F7vjpflls.jpg" Stretch="UniformToFill"></Image>
</Grid.Background>
<my:control></my:control>
</Grid>
and will remove
<Border x:Name="src" removed="Silver">
<Image Source="http://cs322217.vk.me/v322217001/8ceb/83F7vjpflls.jpg" Stretch="UniformToFill"></Image>
</Border>
from user control.
I DO NOT need
this[
^]. I need blurred part of image to fit the original image on window, i mean in position and scaling.
any ideas?