Click here to Skip to main content
15,898,599 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Do we have sth like MASK effect (in SwishMax or Flash) in WPF? Pin
Mohammad Dayyan14-Nov-08 10:48
Mohammad Dayyan14-Nov-08 10:48 
GeneralRe: Do we have sth like MASK effect (in SwishMax or Flash) in WPF? Pin
Pete O'Hanlon14-Nov-08 11:04
mvePete O'Hanlon14-Nov-08 11:04 
GeneralRe: Do we have sth like MASK effect (in SwishMax or Flash) in WPF? Pin
Mohammad Dayyan14-Nov-08 11:08
Mohammad Dayyan14-Nov-08 11:08 
GeneralRe: Do we have sth like MASK effect (in SwishMax or Flash) in WPF? Pin
Pete O'Hanlon14-Nov-08 11:10
mvePete O'Hanlon14-Nov-08 11:10 
JokeRe: Do we have sth like MASK effect (in SwishMax or Flash) in WPF? Pin
Mark Salsbery15-Nov-08 7:02
Mark Salsbery15-Nov-08 7:02 
GeneralRe: Do we have sth like MASK effect (in SwishMax or Flash) in WPF? Pin
Pete O'Hanlon15-Nov-08 8:52
mvePete O'Hanlon15-Nov-08 8:52 
GeneralRe: Do we have sth like MASK effect (in SwishMax or Flash) in WPF? Pin
Mark Salsbery15-Nov-08 9:05
Mark Salsbery15-Nov-08 9:05 
GeneralRe: Do we have sth like MASK effect (in SwishMax or Flash) in WPF? Pin
lneir14-Nov-08 15:07
lneir14-Nov-08 15:07 
Here is some xaml that will animate an ellipse across the text...basically using visual brush to set the fill property of a TextBlock. Then I animate the Left and Top property of ellipse contained in the visual brush. Since a visual brush can be anything you could put image or video here also, basically any visual you want. Enjoy...


<Window x:Class="TextClippingSomething.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="500">
<Window.Resources>
<Storyboard x:Key="Storyboard1" RepeatBehavior="Forever" AutoReverse="True">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:03" Storyboard.TargetName="MyEllipse" Storyboard.TargetProperty="(Canvas.Left)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:03" Value="100"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:03" Storyboard.TargetName="MyEllipse" Storyboard.TargetProperty="(Canvas.Top)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="20"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="15"/>
<SplineDoubleKeyFrame KeyTime="00:00:02" Value="20"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="15"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
</EventTrigger>
</Window.Triggers>
<Grid>
<TextBlock Text="This is my Text" FontSize="60" FontWeight="Black" RenderTransformOrigin="0.5,0.5" x:Name="textBlock">
<TextBlock.Foreground>
<VisualBrush Stretch="UniformToFill">
<VisualBrush.Visual>
<Canvas>
<Rectangle Width="100" Height="50" Fill="Red"/>
<Ellipse x:Name="MyEllipse" Canvas.Left="0" Canvas.Top="20" Height="10" Width="10" Fill="Aqua"/>
</Canvas>
</VisualBrush.Visual>
</VisualBrush>
</TextBlock.Foreground>
</TextBlock>
</Grid>
</Window>
QuestionChanging button states ? Pin
Mohammad Dayyan14-Nov-08 9:07
Mohammad Dayyan14-Nov-08 9:07 
AnswerRe: Changing button states ? Pin
Wes Aday14-Nov-08 9:34
professionalWes Aday14-Nov-08 9:34 
GeneralRe: Changing button states ? Pin
Mohammad Dayyan14-Nov-08 9:36
Mohammad Dayyan14-Nov-08 9:36 
GeneralRe: Changing button states ? Pin
Wes Aday15-Nov-08 8:50
professionalWes Aday15-Nov-08 8:50 
QuestionBeginner in Wpf ....confuse Pin
VisualLive13-Nov-08 23:47
VisualLive13-Nov-08 23:47 
AnswerRe: Beginner in Wpf ....confuse Pin
Jammer14-Nov-08 4:20
Jammer14-Nov-08 4:20 
GeneralRe: Beginner in Wpf ....confuse Pin
VisualLive14-Nov-08 5:09
VisualLive14-Nov-08 5:09 
GeneralRe: Beginner in Wpf ....confuse Pin
Jammer14-Nov-08 5:38
Jammer14-Nov-08 5:38 
GeneralRe: Beginner in Wpf ....confuse Pin
VisualLive14-Nov-08 17:01
VisualLive14-Nov-08 17:01 
GeneralRe: Beginner in Wpf ....confuse Pin
Jammer15-Nov-08 6:06
Jammer15-Nov-08 6:06 
GeneralRe: Beginner in Wpf ....confuse Pin
VisualLive15-Nov-08 21:52
VisualLive15-Nov-08 21:52 
GeneralRe: Beginner in Wpf ....confuse Pin
Jammer16-Nov-08 2:27
Jammer16-Nov-08 2:27 
GeneralRe: Beginner in Wpf ....confuse Pin
VisualLive16-Nov-08 5:25
VisualLive16-Nov-08 5:25 
GeneralRe: Beginner in Wpf ....confuse Pin
Jammer16-Nov-08 5:55
Jammer16-Nov-08 5:55 
QuestionOpen SharePoint file for editing from WPF client application Pin
Vipul Mehta13-Nov-08 23:28
Vipul Mehta13-Nov-08 23:28 
QuestionDataServiceContext.SaveChanges method not found Pin
salon13-Nov-08 22:15
salon13-Nov-08 22:15 
AnswerRe: DataServiceContext.SaveChanges method not found Pin
Michael Sync16-Nov-08 19:01
Michael Sync16-Nov-08 19:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.