I am writing a little game in SL, but have a big problem. There is an image called 'ship' I want to use as player. It moves with the "Canvas.SetLeft(ship,ship.X+ship.speed)" method, but it seens like flickering. I tried to set higher the gameloop timer interval, but it didnt help me out.
Around the internet i couldnt find anything about sl double buffer or something like that.
Hopefully You can help me: )
Hey
Would you be able to post a sample online somewhere that demonstrates this problem? Double buffering is not something that is necessary in Silverlight, and will not help in this situation.
One thing which you could try is to set enableGpuAcceleration="true" on the Silverlight plugin object and set CacheMode="BitmapCache" on the "ship" element. Without knowing what the problem you are running into is, I can't know if this will help or not, but it is worth trying.
Related
I have looked around everywhere on this subject, found quite a bit of information, it all looks very complex. I have found this article which is really good.
But it doesn't really breakdown how to calculate the values to enter into the ArcSegment to make a full circle, does anyone have any advice. Just show me how to make an ArcSegment which will start at one point and go around 360 and I will work from there.
I have the better solution in form of highly customizable open-source project: https://github.com/panthernet/XamlRadialProgressBar
You can style it as you like or examine the code and create your own beast :)
I have done exactly this, as described in the blog post:
http://dragablz.net/2015/09/15/bending-the-wpf-progressbar/
I'm currently using the Silverlight Map control for WP7, and am trying to visualize driving directions on the map. In order to highlight the route needed, I am using a MapLayer with a MapPolyline. The problem is that even with CacheMode set to BitmapCache, the MapPolyline area gets redrawn whenever the user pans or zooms the map. I've used other controls such as Ellipses or Pushpins, and with BitmapCache on, none of them redraw and give the same performance hit as MapPolyline.
Here's a quick example
<maps:Map ZoomLevel="3">
<maps:MapPolyline Name="line" Stroke="Red" StrokeThickness="9">
<maps:MapPolyline.CacheMode>
<BitmapCache/>
</maps:MapPolyline.CacheMode>
<maps:MapPolyline.Locations>
<maps:LocationCollection>
<geo:GeoCoordinate Latitude="33" Longitude="33"/>
<geo:GeoCoordinate Latitude="36" Longitude="33"/>
<geo:GeoCoordinate Latitude="33" Longitude="36"/>
</maps:LocationCollection>
</maps:MapPolyline.Locations>
</maps:MapPolyline>
</maps:Map>
If you set App.Current.Host.Settings.EnableRedrawRegions = true; you can see the redrawing that occurs. The performance is particularly bad when you have a larger polyline and zoom in closer.
Is there anything that can be done to help? The native Bing Maps has pretty smooth route drawing, so I would think that there should be a way to solve this?
Thanks!
Can you explain a bit more what the problem is?
I've got an app - RunSat - in which I draw polylines with several hundred points (e.g. I just looked at a 3 hour long bike ride) and this draws fine - including during zoom operations.
I don't understand the problem - even using the sample code above. To help - are you testing on a phone or on the emulator?
As for CacheMode and BitmapCache, I'm really not sure about using these settings for the map - I don't use them in RunSat if that helps - I just leave the phone alone to work out its own GPU drawing.
There is an example of two-way binding to Center property from Micrsoft guys.
You can find it here.
Its sample works fine, but they disabled full animation. When I set AnimationLevel="Full" and use the Compass I get trembling picture.
I really like aminations effects and don't want to turn it off.
Are there any ways to get working Compass and keep full animation?
This is a known problem and as far as i know, it hasn't been fixed. I too would very much like it to be fixed.
When full animation is on and the map is moved, it will move the map in an arch (zooms out and then back in). However, small distance movements still use the arch and this creates the shaking.
I have searched extensively (4 months ago) for a good work around for this problem.
I didn't find anything other than turning off the full animation.
I want to create a slider with images like a control in the bottom of the youtube(floating images with left and right navigation button). How i have to start. i am new to wpf.
for example: http://blog.wpfwonderland.com/page/4/
Geetha.
I think the best way to start anything is just to start right away. Even if you don't know how to start... Just write the first line of code. Let it be awful. Hardcode images. Use dirty tricks. Then throw it away and rewrite.
Along with writing the code read a lot. There are dozens of books on WPF out there. MSDN sections are awesome.
Don't forget to read the code too. This technique is extremely helpful. You can find good examples of carousel implementation.
Hope this helps.
I'm currently trying to build my personal website with Silverlight 3 and I've got this idea that you should be able to flip through the content in a certain way. I haven't seen exactly what I wanted before, so I uploaded a screenshot of the design for you guys to get a better idea of what I'm talking about:
Picture of desired effect http://www.bo-mortensen.dk/bmdkflip.jpg
As you can see it's more or less a carousel on the X axis. I've seen a fair number of carousel tutorials, but it seems to be quite "complicated" for what I'm looking for.
My main problem is that I fail to understand how to make this thing dynamic. I can sure do the flipping animations, but when it comes to the best approach of making the bottom page (the mirrored one) the previous etc, I'm a bit lost :)
I'm looking for any good advice on how to make this dynamic in such a way that the only thing that needs to be changed is the content itself (text, pictures etc) Also, I believe that each page/usercontrol should be using the same two (flip up and flip down) animations, if that's possible at all?
Hope I made myself clear on this - it's late after all ;) If not, just let me know and I'll see if I can elaborate!
Looks like you are looking for a Flippable 3D control. So check out my blog for one and you can tweak it to make vertical rotation.
http://jobijoy.blogspot.com/2009/04/3d-flipper-control-using-silverlight-30.html