Click here to Skip to main content
15,885,933 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
have a circle (Ellipse) in my windows phone app

<Ellipse x:Name="AniCircle" Grid.Column="1" Grid.Row="0" VerticalAlignment="Top"
Stroke="{StaticResource PhoneAccentBrush}"
StrokeThickness="4"
Width="240"
Height="240" />

i want to fille circle with animating waves similar to this

What I have tried:

i followed this https://stackoverflow.com/questions/22044041/animate-circles-fill-using-sine-wave solution but unable to get in windows phone 8.1
Posted
Updated 2-Sep-17 13:05pm
Comments
Graeme_Grant 2-Sep-17 9:36am    
What is your question?
Member 13390259 2-Sep-17 10:41am    
i wanted to know how to fill circle with wave like animation in UWP or Windows Phone silverlight as show in stackoverflow but it is for wpf

1 solution

Where are you stuck? Is it the WPF VisualBrush? According to the documentation[^]:
Quote:
Paints an area with a Visual.

Now, Google Search is the first place to look. Here is the search that I used: uwp visualbrush - Google Search[^]

First search result was this: Composition brushes - UWP app developer | Microsoft Docs[^]:
Quote:
A brush paints the area of a Visual with its output. Different brushes have different types of output.

This sounds exactly like what we want. It looks like there are two different brushes that you could use:

1. CompositionSurfaceBrush:
Quote:
Paints a SpriteVisual with pixels from an ICompositionSurface.

2. CompositionEffectBrush:
Quote:
A brush contianing an effect created with the CompositionEffectFactory.CreateBrush method.

Now that we know WHAT we are looking for, we can refine our Google Search for examples of how to use these UWP brushes: CompositionSurfaceBrush xaml example - Google Search[^]

There are a number of useful examples to choose from in the search results. Here is one of them: Working with Brushes and Content – XAML and Visual Layer Interop, Part One - Building Apps for WindowsBuilding Apps for Windows[^]

And here is a video of using Storyboard animation in a UWP app (from the very first search we did above): UWP: Animation of Elements with Using the Storyboard - YouTube[^]

Now all you need to do is check out the above links, maybe look at some more links from the two searches, try out each of the parts and get them working, then you will be ready to work out how to convert the code. This is the journey that I would have to make to help you with your task.
 
Share this answer
 
Comments
Member 13390259 3-Sep-17 2:55am    
Okay, i am trying with path for creating waves and animate using story brush but wpf has visual brush which is not available in uwp or windows phone
Member 13390259 3-Sep-17 2:57am    
is there any way to use visual brush either in uwp or windows phone

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900