I have been testing my .NET windows applications with Mono on Ubuntu and noticed that my controls are always stretched in height. Width wise appears to be fine. I have a stack of 5 comboboxes that fit nicely within a panel, but with Mono on Ubuntu the comboxes are too tall and the last comboxbox is pushed into the boundary of the panel. Anybody know why this is happening?
You can check and see if you are using AutoScaling by accident:
http://www.mono-project.com/FAQ:_WinForms
Or someone pointed me to a really weird cause of this a couple of days ago, having Thai fonts installed on Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/539008
Related
I've created an WPF application that should run on Win7 and Win10.
It displays some ListBoxes and I designed it on Win7 - all looks well!
Now I run it on Win10 and it looks very wiered. The ListBoxItems are larger than the ones on Win7 and so they display scrollbars where no scrollbar should be.
After some testing with snoop I see that the Border and the Padding of the ListBoxItem has changed.
In Win7: Border="0,0,0,0" Padding="2,0,0,0"
In Win10: Border="1,1,1,1" Padding="4,1,4,1"
Were does this come from?
How can I prevent such errors?
It couldn't be that I must set all values of all WPF Elements to an explicit default value, just to be sure they stay the same under Win10.
I'm thinking this could be something to do with the Frameworks used, I tested below with Framework 3.5 and Framework 4.6.2. Is this the padding difference you are seeing from Windows 7 to Windows 10?
I checked using snoop and see the padding differences you mentioned, padding="2,0,0,0" changed to "4,1,4,1" Maybe you could set the properties of your application to only use a lower Target Framework that is in your Windows 7 machine?
How to change Target Frameworks:
https://msdn.microsoft.com/en-us/library/bb398202.aspx
I am using Bing maps Wpf control.
When using on touch device (I am testing on touch screen monitor) it is very slow - Zooming, Panning, Rotating are extremely slow.
This is basically the same question as this on msdn forum, but there is no solution or workaround there.
It is obvious that this control is not optimized for touch, but I am wondering if anybody else has this problem and figured out some optimization?
Note: I have tested Windows 8 version of Bing maps control, but have to use Wpf version because it supports rotation (setting heading other than North).
Note: Number of pushpins is not important here, same problem is present with 0 pushpins.
Thanks for any help or useful suggestions!
A new version of the WPF control was actually just released within the past month. The update consisted of bug fixes and improved touch functionality. http://www.microsoft.com/en-us/download/details.aspx?id=27165
However, there are a couple of new bugs that have turned up since this release and our team has fixed them, but the new installers have not yet been released (will be soon).
I have written a basic WPF VB.net application, in Visual Studio 2012 in Windows 8.
The program basically takes over the full screen and displays text that is supplied from a XML it is meant to fill the screen based on the screen resolution and size.
The problem that I am having is to do with formatting. If I run the application up in Windows 8 the text will fill the screen correctly.
As soon as I run the application in Windows 7 on any PC it seems to change the spacing and end up leave space at the bottom of the screen.
I have checked the follow and not been able to find any reason for it:
1. Screen resolution (they are both running 1650 X 1080 at 96 dpi)
Copied the Fonts from the Windows 8 install ( no change)
Tried a different types (Tahoma, Segoe, Century Gothic) nothing changes .
Checked over all setting on Windows 7 (With or with out Aero theme, with or without Taskbar)
This is a similar issue to what I have
Differing char spacing in a WPF RichTextBox
But this still has not fixed my issue. ( http://msdn.microsoft.com/en-us/library/vstudio/system.windows.media.textformattingmode%28v=vs.100%29.aspx)
Any help on this would be great as I am really stumped to what the actual issues is and or could be.
here is some images of what the issues are
http://tmblr.co/Z3zZjsgWM-BG
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.
I am relatively new in the WPF world and one thing I immediately noticed is how laggy the window content is drawn when you resize a window. For example if you have scrollbars at the window edges those scrollbars will be partly hidden while shrinking and have space between them and the window border when enlarging.
This even happens with an empty WPF project created in Visual Studio. What's even worse is that it also happens with the background and you can see stuff behind the window (other windows, desktop wallpaper, etc.) leak through when enlarging.
At first I thought that it's an ugly limitation of WPF seeing that native or WinForms applications resize just fine (if written properly). But when I look at Expression Blend the window background stays opaque (though the window content still lags behind). What do they do to prevent described problem and are there any ways to improve resizing to more approximate native/WinForm GUIs?
The reason of lags is nicely explained here
Are you running Vista without SP1 ? From what I have read, this was a common issue that is supposed have been fixed..
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/3960d6a6-e873-455c-9ddc-1e2dd32e090b/
I'm not seeing this behavior, myself. I develop on vista x64 sp1 and/or a virtual pc running xp x32 sp3. Wpf uses directx, could it be your video card/machine? Try running your app on a diff machine and see if you have the same results.
I have the same issue with the interface lagging while resizing. I suspect that the reason for the lag is it is resizing the underlying frame buffers in direct X which is never particularly fast. I am not sure what you can do about it though.
I've been looking for information on this issue as well. I just thought it was a windows "feature" that some intrepid microsoft programmer thought would be cool. I was hoping to be able to turn it off so that window resizes would actually follow my mouse, instead of lagging and then overshooting. Grr.