Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 9 May 2008 14:43:36 +0900,    group: microsoft.public.dotnet.internationalization        back       


TableLayoutPanel.LayoutSettings   
When TableLayoutPanel writes LayoutSettings and the settings contain value 
having decimal separator (e.g. 5.4) .NET writes the decimal using the 
decimal point of the current locale. For example if I have the following 
value

 <data name="tableLayoutPanel1.LayoutSettings" 
type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
    <value><?xml version="1.0" 
encoding="utf-16"?><TableLayoutSettings><Controls><Control 
Name="button2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" 
/><Control Name="button1" Row="0" RowSpan="1" Column="0" 
ColumnSpan="1" /></Controls><Columns Styles="Percent,100" 
/><Rows Styles="Percent,20,1,Percent,79,9" 
/></TableLayoutSettings></value>
</data>

It is a bit hard to read but the important part is 
"Percent,20,1,Percent,79,9". Here the item separator is , but my form was 
written on Windows having default localize set to Finnish so it uses Finnish 
decimal separator (,) instead of English (.). Saving the same data on 
English settins produces "Percent,20.1,Percent,79.9".

Is this a bit odd. If developer A using Finnish locale create the form and 
sends it to his American colleque .NET can not read the data correctly.

My opinion is that on .resx the decimal value should always written using . 
and not national decimal separator.

Is there bug in .NET framework or am I missing something?

Microsoft! If you could include full source code of .NET with SDK like 
CodeGear does with VCL I could have solved this myself. What is the point 
that there is no .NET source code available. I just don't get it.

Best regards,
Jaakko Salmenius
http://www.sisulizer.com - Three simple steps to localize
date: Fri, 9 May 2008 14:43:36 +0900   author:   Jaakko Salmenius

Re: TableLayoutPanel.LayoutSettings   
Hello Jaakko. This is a very interesting issue - thank you for raising it.
I agree that while it's fine to format the values that are displayed on the
Column and Row Styles dialog, invariant formatting should be used to
persist them in the RESX file.

As it happens though, there don't appear to be any noticable affects
at runtime. Because these are percentages, the sizes are relative. For
example, one column could be set to 2490.00% with another at 7510.00%,
and they would render the same as ones with settings of 24.90% and
75.10%, respectively.

Your point is valid though, and I'll log a bug report so that the team
investigates it further.

As to .NET Framework source code availability - it is available in
read-only form, though not shipped as part of the SDK. Please see
Scott Guthrie's blog entry on this subject:
http://weblogs.asp.net/scottgu/archive/2008/01/16/net-framework-library-source-code-now-available.aspx

Cheers,
Garrett McGowan [MSFT Developer International]

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Jaakko Salmenius"  wrote in message 
news:F11516E2-33DA-4047-8E2F-205DF4AB09E5@microsoft.com...
> When TableLayoutPanel writes LayoutSettings and the settings contain value 
> having decimal separator (e.g. 5.4) .NET writes the decimal using the 
> decimal point of the current locale. For example if I have the following 
> value
>
> <data name="tableLayoutPanel1.LayoutSettings" 
> type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
>    <value><?xml version="1.0" 
> encoding="utf-16"?><TableLayoutSettings><Controls><Control 
> Name="button2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" 
> /><Control Name="button1" Row="0" RowSpan="1" Column="0" 
> ColumnSpan="1" /></Controls><Columns Styles="Percent,100" 
> /><Rows Styles="Percent,20,1,Percent,79,9" 
> /></TableLayoutSettings></value>
> </data>
>
> It is a bit hard to read but the important part is 
> "Percent,20,1,Percent,79,9". Here the item separator is , but my form was 
> written on Windows having default localize set to Finnish so it uses 
> Finnish decimal separator (,) instead of English (.). Saving the same data 
> on English settins produces "Percent,20.1,Percent,79.9".
>
> Is this a bit odd. If developer A using Finnish locale create the form and 
> sends it to his American colleque .NET can not read the data correctly.
>
> My opinion is that on .resx the decimal value should always written using 
> . and not national decimal separator.
>
> Is there bug in .NET framework or am I missing something?
>
> Microsoft! If you could include full source code of .NET with SDK like 
> CodeGear does with VCL I could have solved this myself. What is the point 
> that there is no .NET source code available. I just don't get it.
>
> Best regards,
> Jaakko Salmenius
date: Fri, 23 May 2008 17:03:29 -0700   author:   Garrett McGowan \(MSFT\)

Re: TableLayoutPanel.LayoutSettings   
Thank you Garrett,

.NET source code debugging works very well. This is exactly what I needed!

Best regards,
Jaakko
date: Wed, 30 Jul 2008 12:53:49 +0900   author:   Jaakko Salmenius

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us