These are chat archives for AvaloniaUI/Avalonia

2nd
Jan 2015
xamldude
@xamldude
Jan 02 2015 15:57
hey all, hope you enjoyed the new year :-) quite a few more people in here now ;P
xamldude
@xamldude
Jan 02 2015 21:49
love the idea of baking DI into Perspex. I'm using WPF + Prism5 at work. I'm just curious -- in a lot of examples I've seen online they recommend making the composition root be something like App_Startup. Is it best practice to have your container resolve dependencies if its abstracted away into some sort of navigation abstraction?
In Prism I just do RequestNavigate(..) on the RegionManager. Come to think of it, native regions in Perspex would be awesome ;)
Steven Kirk
@grokys
Jan 02 2015 22:16
I've never actually used prism, it always looked a bit over engineered to me, but that may have just been the documentation
What does RegionManager do?
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:23
Prism is a bit overengineered, yes. I agree.
but navigation abstraction is a cool feature
Steven Kirk
@grokys
Jan 02 2015 22:25
Oh and happy new year! Sorry I've not been near a computer recently.
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:25
I admin that working with navigation or several windows in MVVM is a dark topic
thanks, Steven! the same to you!
have you tried to execute the files I sent?
Steven Kirk
@grokys
Jan 02 2015 22:26
No not yet! When I get back home and to a computer I will give them a try!
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:27
OK!
I've found that the workflow with the typeconversion branch is really slow!
I tend to discover something that I have to change in the typeconversion "mechanism"
and I have to go to another clone of the repo, load the branch, modify it, and finally merge to Xaml.
and in the other clone, pull the changes with the merge
it's slow :(
Steven Kirk
@grokys
Jan 02 2015 22:29
Hmm you shouldn't have to do that
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:29
just to keep it separated
the problem is that if I have to change anything in the TypeConverters, I have to switch branches
make the change to that branch (typeconverter)
so I have 2 clones of my fork
should I find a change in typeconverters
Steven Kirk
@grokys
Jan 02 2015 22:30
You shouldn't need two clones
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:30
but what if I'm in the middle of a change?
I can have pending changes in the Xaml branch and find out that I have to modify something in the typeconverter branch in order to continue
I keep them separated and merge
from typeconverters => xaml
Steven Kirk
@grokys
Jan 02 2015 22:31
That's a job for the git stash
But I guess it could be that you'd be better working in a single branch and then cherry picking to a separate branch for the price
Not price, PR. In on my phone - it's a bit difficult!
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:34
oh! that sounds like the RIGHT way!
haha, it's impressive how much I should learn
:)
thanks!
by the way, I'm a bit worried because I have some doubts about the binding of VMs
when you bind to a Text property to an int in the ViewModel and the Binding is TwoWay, in WPF, the binding detects this problem
xamldude
@xamldude
Jan 02 2015 22:37
I tend to almost never use multiple windows
I keep everything in app. Render dialogs and stuff as overlays
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:37
the TextBox is outlined in red
but how to handle this situation?
how to inform about this kind of errors?
xamldude
@xamldude
Jan 02 2015 22:38
I know WPF uses a few interfaces for it. INotifyDataErrorInfo and some other one. Probably worth looking into. Seeing any problems people have with it or what one solves over the other interface.
I believe one of the two is more recently supported as the only option for Windows.UI.Xaml, so it must have some merit
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:39
@xamldude It's a common way to overcome a windowing system, but windows are there. You choose to ignore them, but just because they are difficult to handle in MVVM scenarios
xamldude
@xamldude
Jan 02 2015 22:39
@SuperJMN yep, you're right. if it were easier I'd likely be more open to it
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:39
:)
I hope we can find an elegant way to fix that
about the IDataErrorInfo, I NEVER used it
(just in a few toy-apps)
and I have to say that I hate it even more than INotifyPropertyChanged
haha
any ideas will be welcome!
Rohan Singh
@Rohansi
Jan 02 2015 22:41
whos still using the vs2013 roslyn preview?
master doesnt compile in vs2015
no declaration expressions anymore :(
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:41
yes, doesn't compile because of that
it's easily fixed!
Rohan Singh
@Rohansi
Jan 02 2015 22:42
yeah its just a bit weird having it in there
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:42
if you want the fixed version, just get this:
haha, yes, it is
I hope it compiles in VS 2015 soon!
Rohan Singh
@Rohansi
Jan 02 2015 22:43
just need to move the declaration out of the initializer and it works
there it is
right!
I did in my Xaml branch for it to compile
how do you see the task I told you about?
(XamlObjectWriter)
Rohan Singh
@Rohansi
Jan 02 2015 22:45
hm?
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:45
oh, sorry, maybe you don't remember
let me check the message log
yes, it's there. I told you this:

I'm not sure how you can help, but for me, the worst impediment is that the XAML reading depends on System.Xaml

specifically, the XamlObjectWriter

it's responsible for reading from stream and inflating all the instances, with the wiring

it sits just in top of the XML parser, that is an XmlReader

we should have our own XamlObjectWriter and XamlReader

otherwise, we will have to wait for Microsoft to release the sources for it :frowning:

we don't have System.Xaml as PCL
it's not portable
we have a dependency on it
the XAML object writer and the reader
it's not open source yet
to get the XAML feature ready to be released, we need an open source version of XamlReader and XamlObjectWriter
Steven Kirk
@grokys
Jan 02 2015 22:48
Have you already posted a request that they open source it to the for net foundation José?
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:48
not directly
I saw a message that you wrote there, I think
I don't remember
but I should do it!
yes, I will do
Steven Kirk
@grokys
Jan 02 2015 22:49
I imagine it should be really useful to xamarin too
José Manuel Nieto
@SuperJMN
Jan 02 2015 22:49
for sure
xamldude
@xamldude
Jan 02 2015 22:53
I don't see why they wouldn't, as its implementation agnostic. its a generic xaml reader