Why does GMap.NET colors are opposite? - wpf

I have very strange problem.
The color of any map provider given to GMap.NET the colors are opposite.
did anyone encounter this issue?
I have a side project with same parameters and it works fine.

never mind.
It turns out that gmap.NegativeMode was set to true.
It fixed it.
thanks anyway.

Related

react-virtual variable sizing with images not calculating on initial load

I want to render a virtualized list of images with variables heights, my current implementation is following the variable example on tanstack docs, but adding a random height src image and loading that instead of text as the content for the row item.
This is not working great and is a bit glitchy. Im using a best guess estimateSize but was hoping for a system that would fully calculate this for me.
The height is completely off until you scroll at least once, then the image heights seem to get calculated. Otherwise, once you start scrolling, the performance here is pretty good.
Any feedback on this implementation (no idea if this is how it's intended to be implemented), or indication on how I can fix the problem would be appreciated. Thanks!
My demo here:
https://codesandbox.io/s/boring-ishizaka-yiywvo?file=/src/main.jsx
p.s if you know how to achieve this with react-virtualized (with CellMeasurer) also keen to hear/see it. I've struggled with CellMeasurer and image onLoad to calc correctly.
Ok dug through some github issues, and mashed a few things together and this seems to be working well. https://codesandbox.io/s/usevirtualresizeobserver-04-11-2021-forked-yur6we?file=/src/App.tsx
It uses a custom wrapper that leverages ResizeObserver, shame this isn't something that's exported from the lib considering this would be a very common use case.
here is a much simpler solution with the new react-virtual version
the idea is to call measureElement on img onLoad

What is the best approach With XAML to have elements Displayed on Screen v. Print

With CSS you can target Screen and Print. How would you do this with WPF?
I have elements that I want to display on screen differently than when they are printed.
Right now I'm hacking two instances of the same element, and setting visibility in code, which just feels really really wrong.
Thank you!
In that case, check here, here and here.

Windows FOrms fonts look jagged in compiled application

This always happens to me but I'm at a loss to work out why.
Here is my designer
here is the actual form
look at the W in the heading on each. See how it's all jagged in the second? WHy is that?
I've tried changing AutoSizeMode to Font (I've got it off at hte moment) but it didnt seem to make any difference.
Is ClearType turned on?
http://windows.microsoft.com/en-GB/windows7/make-text-easier-to-read-using-cleartype
Edit: You can tune the ClearType settings (Look at the link above)

Bing maps two-way binding to Center property. Animation problem

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.

Silverlight image flickering - how to avoid it

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.

Resources