Codename Theme Builder - codenameone

Codenameone Theme Designer shows a black window beside the themeGui Configurator, I think I would see the effects on my changes on that black space,
To move this black space:
1 run the program, the simulator will show up on top of this black space,
2 Move the simulator, to a location in the screen that hides most of it, luckily I use two screens, so I move it to the other screen
3 close your running program,
4 start theme Gui Configurator, you will see the black screen showing at the new location you left your new program,
Anyways, what to do with this screen? thank you

This is a bug due to the simulators desktop mode. If you change the simualtor to a regular skin mode then launch the designer it should work correctly. We need to release an update to the designer but due to the CEF migration we're delaying it as much as possible so the update will include the CEF support. Otherwise the designer might break for a lot of people.

Related

Make Touch Screen Ignore Labels for Window Scrolling in Winforms App

I have a winforms app that has a tab page with a lot of labels, textboxes, and other controls. Some users are running this app on tablet PCs. The problem is that it's hard to find a screen area in the tab large enough to "grab on to" in order to scroll the tabs contents up and down with your finger. You have to find a spot in between all the labels and other controls. I don't have the option of moving any of these controls to another tab and don't have much real estate to work with.
Since the labels are not interactive and only display text, I thought it could be good if there was some way to make them ignore touch input so that the user can use the label areas to "grab on to" and scroll the window.
Is there any way to make labels behave this way?
Thanks in advance...
EDIT:
Per request below.
IDE is Visual Studio Express 2012 for Windows Desktop
Platform is x86
The Framework is .net 4.5
UI is primarily Windows 8 running on a tablet PC

Black Border While Resizing

Im beginning in my journey of learning WPF. After a few days of coding I see that whenever I resize any WPF form I get a black border on the bottom and right while resizing, like an artifact, as if the screen is too slow. When working with winforms I never noticed this.
Like so :
Is this a known problem? any simple workaround?
EDIT 1:
Seems its related to the graphics driver, I only work on laptops with weakish gfx cards, so does anyone else have this issue? (Im also using Win7 SP1)
It's a known problem, and it's unlikely that it will be fixed. There is a work-around that reduces the impact of this problem if your background is sufficiently uniform: https://stackoverflow.com/a/14309002/33080
My understanding of the underlying cause is that WPF controls lag behind on resizes: WPF draws them in the "wrong" location briefly. See the linked question for a demonstration.
If you resize a window it has to redraw. This takes some time and also it occurs after the window manager already resized your window and shows it; in that case you'll get a black border in WPF and one with the normal window background (grey, usually) in Windows Forms.
Usually all you can hope for there is that the computer is fast enough with the redraw to not show it.

Strange "frozen" content of WPF Window bug

A few of my users are experiencing a strange bug. I have a simple WPF window that contains a few textblocks and buttons. After a short time using my application successfully the users that experience the problem report that the window's content becomes empty and only the border of the window is visible.
After remoting onto their machines I have confirmed that it looks like the content of the window is frozen. When the window first opens it appears like its see through and displays whatever is behind it. If I move the window around the same frozen image of what was behind the window when it opened stays there. If I bring something in front of the Windows (such as a browser) the "frozen image" in the contents will change to a frozen image of whatever was in front of it. I have discovered that the buttons are still active and clickable in the window, so it's not completely frozen it just seems not to be drawing the content properly.
The issue only seems to affect a small percentage of my users and I cannot recreate this issue on any of my test machines. Any ideas about what is happening would be greatly appreciated.
If you have a user that's willing to experiment to find a solution, have them Disable Hardware Acceleration in WPF. If this fixes the issue, then it's most likely a graphics driver problem.

Visual Studio 2010 Beta 2 + ClearType

I was wondering: are you satisfied with the text-rendering in the Visual Studio 2010 editor (Beta 2)? On my primary monitor it looks very blurred, even when using font size 12!
When using font size 10 or 11 it's horrible. Can the WPF text rendering mode be set explicitly for VS code window?
EDIT: I am using Windows 7 x64 and my primary monitor is a Benq G2412HD. What's kind of strange is that the font seems to be nicer on the secondary monitor, which is a 4 year old 19' TFT.
EDIT: I tried several Cleartype settings but none really looks as nice as when using Visual Studio 2008.
The first image is from the primary monitor, the second from the secondary. Both are using Consolas 10pt (my preferred font).
Primary screen http://img4.imageshack.us/img4/6789/vs2010.png
Secondary screen http://img4.imageshack.us/img4/7986/vs20102.png
I use Consolas size 10 and I have no issues.
Try following the instructions on Microsoft's website for tuning clear type. You can find it here.
If you use IE when accessing that website, you can make changes to clear type settings right from the browser.
TextSharp is the answer right now. I really hope they continue to fix this issue because I've had terrible results on my primary and secondary monitors with the standard rendering. Using beta 2.
With 8 or 9pt Lucida Console the text is fine with text mode set to 'Aliased'.
Here is how VS2008 and VS2010 beta2 editor text rendering looks for me, side by side. The font is Consolas 13pt.
VS2008:
http://int19h.org/so/cleartype_vs9.png
VS2010:
http://int19h.org/so/cleartype_vs10.png
I don't see any observable differences.
[EDIT] Okay, I've reproduced it with the color scheme posted. It seems that the key part here is to use bright text on dark background. With dark-on-bright, the output seems to be the same.
Here's some guesswork. Apparently, Direct2D (which WPF uses for antialiased text output) always "gives precedence" to foreground (i.e. text) color over background color when doing subpixel antialiasing. On the other hand, traditional GDI ClearType seems to always give precedence to dark colors over bright ones. Thus, with bright letters and dark backgrounds, ClearType text becomes thinner, but Direct2D text remains of the same size, pixel-wise. Furthermore, as bright pixels are more intensive, the same amount of them "stands out" more with same foreground/background contrast, so bright-on-dark D2D text looks noticeably "bolder".
Well I experience the same oddity (not only in VS2010, but in all WPF applications). Sadly there seems no way of setting a "backwards style" text rendering in WPF in general.
I just found this addon "Text Sharp" for VS2010 on the VS gallery which lets you select different font aliasing options for the VS2010 text editor, but at least for me, this didn't help with the issue.
Here is the link, if you might want to try it: Text Sharp VS2010 extension
Please have a look at the screenshots in the following update (to come in final release of VS2010), and see if the improvements solve your issues with VS font rendering:
http://blogs.msdn.com/text/archive/2010/03/05/additional-wpf-text-clarity-improvements.aspx
http://blogs.msdn.com/visualstudio/archive/2010/03/11/wpf-text-clarity-improvements.aspx
Have you ensured that ClearType is enabled on your OS? I've seen similar issues with 2010 when ClearType was disabled on my machine. Re-enabling ClearType made the Text snappy looking again.
For some reason the ClearType setting on my OS kept getting undone when I TS'd around a bit. I had to reset it a couple of times but it seems to have calmed down recently (I believe I was using a Pre-RTM build of Win7 at the time).
Try using Courier New font.
Tools -> Options -> Environment -> Fonts and Colors
ollifant I agree with you, they are different.
Others may not see any differences from screen shots, but on the actual machine I can see differences. Loading the same project with the same settings side by side looks different. I think it is the difference in how WPF renders fonts or something.
The VS 2010 pane looks shifted slightly left, like kerning in the font is off by a little or something. Again - same font in both VS 2008 and 2010.
I have tried now on Windows 7 and Windows Vista. Maybe older XP machines render differently, can't say (and no I won't load XP to find out).
I have noticed a rendering problem with Visual Studio 2010b2 as well.
I've tried adjusting the clear type settings to no avail.
I use consolas 9 pt on win7x64 with a average 19 inch TFT.
This is what it looks like on my system.
A side by side screen shot
OK here's what you do. Finally figured it out!
You need to reset cleartype to the default values. Don't try to tune it based on what you think looks good - because what you think looks good won't in VS2010.
I noticed on a brand new install of Windows 7 my VS2010 text suddenly became a lot nicer. After running cleartype to try to get nice text on a wall mounted Sony TV I found it had totally screwed up text for my normal external monitor.
I haven't yet found a way to reset cleartype explicitly, but apparently the below explains what the defaults are :
When you open ClearType Text Tuner,
select "Turn on ClearType" check box
and click on Next. Then, again click
on the Next after setting Native
Resolution. Then, select the options
as given below:
1st Screen – 1st Option out of 2
2nd Screen – 2nd Option out of 6
3rd Screen – 1st Option out of 3
4th Screen – 2nd Option out of 6
Finally, click on Finish.
This is for VS2010 RC.

WPF not rendering on remote desktop

I'm having problems with the rendering of a WPF app over a remote desktop connection.
The applications chrome is rendering, but none of the content is coming through, as if the window is not drawing. Instead the previous content of the screen is showing in it's place.
This has been a problem with the application running on both Vista & Win 7, with remote control being taken from XP and Win7.
The problem is not application specific, if I create a new WPF app, with just a textblock on the window, it will also not run. (Neather will the windows preview in VS2008 display.)
Is there some trick to getting WPF running under RDP?
I read on Kevin Dente's blog (from a twitter post) that he was having trouble with WPF apps in virtual machines. While not the same as Remote Desktop, it's possible the problem could be the same. Kevin was able to fix his problem by disabling hardware accelleration by creating a DWORD registry value at
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\DisableHWAcceleration
and then setting it to 1.
His original blog post is here: http://weblogs.asp.net/kdente/archive/2009/10/19/visual-studio-2010-beta-2-editor-performance-fix-running-on-a-virtual-machine.aspx
That may not be your exact solution, but maybe it points you in the right direction.
WPF should render over RDP; it's smart enough to know when it can render in hardware, and when it can't it reverts to its own GDI+ based software rendering. I would make sure you're running .NET Framework 3.5 SP1 on the remote machine, since there were changes to remoting that might pose issues. (See link below.)
I've been developing a WPF app for the past 6 months and it works just fine over RDP. (From Vista and Win7 to XP, Vista and Server 2003.) One important caveat, however, is that it renders using the Classic theme. So if you're using controls that don't have a classic theme, they won't render. If you're just dropping a TextBox on a Window, then obviously that's not your problem.
Check out this question for some links that may be helpful: Are there problems with rendering WPF over Remote Desktop under Windows XP?
I just had this problem with the ribbonwindow not displaying correctly when testing for the first time via RDP - the transparent background was white, the close minimize/maximize buttons were missing, the rounded corners on the bottom of the window were square, and the top row of ribbon buttons were almost impossible to select.
Turns out there was a simple fix for me. Right-click the RDP connection icon (I have it saved on my desktop), select "Edit", then the "experience" tab, and change "detect connection quality automatically" to "LAN (10 Mbps or higher)".
This fixed it for me.
Ade
Did you also try Win7 latest RDP - Win7 connection? The thing is WPF doesn't use GDI to draw elements.
VNC clients (like UltraVNC) probably will do the trick for you as they using much simplier algorithms more like of sending bitmaps.
I have the same problem than the asker. The standard, out-of-the-box Checkbox is not rendering correctly. I can only see if it is checked when hoovering the checkbox. Otherwhise, no difference between checked and unchecked. Important note : It occurs when setting the foreground to white (see here : https://social.msdn.microsoft.com/Forums/vstudio/en-US/1c03db49-7e53-4cbb-9dd1-b328017c4453/wpf-checkbox-and-radiobutton-check-mark-not-showing-under-xp-windows-classic-theme-and-remote?forum=wpf)
Our application used to have this problem with a custom progress bar.
We fixed this by setting the background color of the Border control to White. This leads me to think there is an issue with transparent backgrounds
There is no special trick needed to get WPF content to show across remote desktop. Our WPF-based app renders just fine over RDP (tried from numerous machines) with no problems. We're even using animations, gradients, WriteableBitmap, etc. w/ no problems.

Resources