User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Migration 1.1.x -> 1.2.0 (Unity Package)

02 Mar 2015, 08:14

I've noticed some changes not listed in the release notes:
1. OTF fonts format seems to not supported anymore. I've converted fonts to TTF to fix that, but it was just guessing as NoesisGUI doesn't display any meaningful error for that, just "font not found". Also I can't find any tutorial regarding fonts and Unity3D.
2. for MouseEventArgs the "e.position" replaced with "e.GetPosition()" (and you need to provide value for that, "null" (like in WPF) is crashing Unity - I've reported the issue to the bugtracker).
3. some controls like ScrollViewer, ItemsControl and WrapPanel now have Border or/and Background by default, so you need define default style for them and set these fields to {x:Null} (previously it works without issues).
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
sfernandez
Site Admin
Posts: 1915
Joined: 22 Dec 2011, 19:20

Re: Migration 1.1.x -> 1.2.0 (Unity Package)

05 Mar 2015, 19:46

1. OTF fonts format seems to not supported anymore. I've converted fonts to TTF to fix that, but it was just guessing as NoesisGUI doesn't display any meaningful error for that, just "font not found". Also I can't find any tutorial regarding fonts and Unity3D.
We leave them out unintentionally when changing the resource architecture. Will add support back in the next release. About the error, if a resource is not found a message should be logged to the console when building the xaml, something like this:
[dx9] Assets/Test/Test.xaml
Parsing TextBlock.FontFamily (@41,8).
'Fonts/Arial' string cannot be converted to FontFamily
2. for MouseEventArgs the "e.position" replaced with "e.GetPosition()" (and you need to provide value for that, "null" (like in WPF) is crashing Unity - I've reported the issue to the bugtracker).
I fixed the e.GetPosition(null) problem and will be ready for the next release, thanks for reporting it.
3. some controls like ScrollViewer, ItemsControl and WrapPanel now have Border or/and Background by default, so you need define default style for them and set these fields to {x:Null} (previously it works without issues).
Yes, our default style sets a border and background to base control classes (Control, ContentControl, ItemsControl, ScrollViewer... but not to Panels like WrapPanel) to give some kind of visual feedback to the user if they don't provide a suitable template. Do you think it is better to leave these properties to the default null?
 
User avatar
ai_enabled
Topic Author
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: Migration 1.1.x -> 1.2.0 (Unity Package)

06 Mar 2015, 02:35

About the error, if a resource is not found a message should be logged to the console when building the xaml, something like this:
[dx9] Assets/Test/Test.xaml
Parsing TextBlock.FontFamily (@41,8).
'Fonts/Arial' string cannot be converted to FontFamily
It was logged, but I didn't understand why, as font was there and everything works fine for other fonts, until I noticed that it's OTF font. Glad to know it was unintentional and support for OTF fonts will be restored.
3. some controls like ScrollViewer, ItemsControl and WrapPanel now have Border or/and Background by default, so you need define default style for them and set these fields to {x:Null} (previously it works without issues).
Yes, our default style sets a border and background to base control classes (Control, ContentControl, ItemsControl, ScrollViewer... but not to Panels like WrapPanel) to give some kind of visual feedback to the user if they don't provide a suitable template. Do you think it is better to leave these properties to the default null?
I've spent much time to found all grey borders/backgrounds controls and override them in styles, it was really surprising as my custom controls (inherited from ContentControl and other base types), for which I didn't set Border or Background in 1.2.0, was rendered with them. And I'm sure it will confuse new users, who develop their UI in WPF prototype and them copy-paste XAML to use with NoesisGUI. So I would like if you remove borders/background or at least mention about them in documentation with a "reset styles" XAML code presented nearby (to help people who don't need these borders/backgrounds get rid of them).
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
timashev
Posts: 28
Joined: 22 Jan 2014, 00:47

Re: Migration 1.1.x -> 1.2.0 (Unity Package)

06 Mar 2015, 08:51

I've spent much time to found all grey borders/backgrounds controls and override them in styles, it was really surprising as my custom controls (inherited from ContentControl and other base types), for which I didn't set Border or Background in 1.2.0, was rendered with them. And I'm sure it will confuse new users, who develop their UI in WPF prototype and them copy-paste XAML to use with NoesisGUI. So I would like if you remove borders/background...
+1! NoesisGUI rendering should be as close to WPF and/or Blend (design-time) rendering as possible! So please remove/fix all the styles those break this compatibility!
 
User avatar
sfernandez
Site Admin
Posts: 1915
Joined: 22 Dec 2011, 19:20

Re: Migration 1.1.x -> 1.2.0 (Unity Package)

06 Mar 2015, 09:38

I've spent much time to found all grey borders/backgrounds controls and override them in styles, it was really surprising as my custom controls (inherited from ContentControl and other base types), for which I didn't set Border or Background in 1.2.0, was rendered with them. And I'm sure it will confuse new users, who develop their UI in WPF prototype and them copy-paste XAML to use with NoesisGUI. So I would like if you remove borders/background or at least mention about them in documentation with a "reset styles" XAML code presented nearby (to help people who don't need these borders/backgrounds get rid of them).
+1! NoesisGUI rendering should be as close to WPF and/or Blend (design-time) rendering as possible! So please remove/fix all the styles those break this compatibility!
Ok, I understand and agree with you. We should behave like WPF as much as possible.
We will change our default styles in the following release.
 
timashev
Posts: 28
Joined: 22 Jan 2014, 00:47

Re: Migration 1.1.x -> 1.2.0 (Unity Package)

05 Apr 2015, 16:58

I've spent much time to found all grey borders/backgrounds controls and override them in styles, it was really surprising as my custom controls (inherited from ContentControl and other base types), for which I didn't set Border or Background in 1.2.0, was rendered with them.
+1! NoesisGUI rendering should be as close to WPF and/or Blend (design-time) rendering as possible! So please remove/fix all the styles those break this compatibility!
Ok, I understand and agree with you. We should behave like WPF as much as possible.
We will change our default styles in the following release.
As of 1.2.2 the problem is not fixed yet. Should we file an issue at bug tracker?
 
User avatar
jsantos
Site Admin
Posts: 2905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Migration 1.1.x -> 1.2.0 (Unity Package)

06 Apr 2015, 15:06

We were focused in v1.2.2 with the Unity5 integration and fixing several critical issues. This one was left out. But I think it will be solved in v1.2.3. Yes, please, report it.

Thanks!
 
User avatar
jsantos
Site Admin
Posts: 2905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Migration 1.1.x -> 1.2.0 (Unity Package)

07 Apr 2015, 21:45

No ticked needed. We already solved it in 1.2.3 as you can see in our Trello board.

Who is online

Users browsing this forum: No registered users and 1 guest