« first day (876 days earlier)      last day (3273 days later) » 

00:04
But what does that have to do with the View?
Or are you trying to pass the model instance via the view to the view model?
In which case, create the view model outside of the view and pass that to the view
okay I'll try to figure this out a bit better first.
you see what I mean? @BradleyDotNET
I understand you have two instances
I just don't understand why you are having such trouble getting it down to one :(
yes so I'm assuming that second instance is coming from the View?
I know what I need to do, pass the AppVM device instance to the View, instead of new MyoDeviceModel(),
00:19
I hope you figure it out, but your view should have no knowledge of the model, period
okay that's a start then
I need to remove the instance of the device from my View
I thought it needed an instance to set the data context
maybe I don't need to set this line at all in the View:

` //this.DataContext = new AdductionAbductionFlexionViewModel(new MyoDeviceModel(), new DatabaseModel());
`
@BradleyDotNET
Ideally something other than your UI does your dependency injection
ya commenting out that line caused an excpetion
so how would I go about moving the dependency injection? Can you give me a code snippet explaining the process?
Not really...
Normally your VM can create those objects itself, but if you want to unit test it you would go through a DI/IoC container
So thats probably what I would do
Or have your view just pass in a factory to the view model so it can control creation of the objects.
Still not ideal though
00:35
so what code should be removed from the view exactly and I can get a better idea
okay so maybe I need to pass in a factory to the viewmodel in the constructor, what exactly is a factory then?
00:55
A factory is an object with a method (usually called Create) that creates a different object
In class-based programming, the factory method pattern is a creational pattern which uses factory methods to deal with the problem of creating objects without specifying the exact class of object that will be created. This is done by creating objects via calling a factory method—either specified in an interface and implemented by child classes, or implemented in a base class and optionally overridden by derived classes—rather than by calling a constructor. == §Definition == The factory method pattern should not be confused with the more general notion of factories and factory methods. The factory...
In object-oriented programming, a factory is an object for creating other objects – formally a factory is simply an object that returns an object from some method call, which is assumed to be "new". More broadly, a subroutine that returns a "new" object may be referred to as a "factory", as in factory method or factory function. This is a basic concept in OOP, and forms the basis for a number of related software design patterns. == Motivation == In class-based programming, a factory is an abstraction of a constructor of a class, while in prototype-based programming a factory is an abstraction of...
01:07
how would that be implemented in my situation?
01:42
ok so the implementation of this Factory pattern isn't making sense to me
I get the concept
02:10
could you provide some pseudo code or a snippet that would apply to my situation?
1
Q: How to expose DependencyProperties within 2 ItemsSource lists (doesn't propagate)

JimGot a StackPanel/ItemsSource within another StackPanel/ItemsSource. The inner one has a Value that updates. Cannot get it to propagate an update to the UI. Note: As a Registered DependencyProperty - it never updates. As a simple Property {get;set;} it updates ONCE then never again. What shoul...

 
5 hours later…
06:52
posted on March 14, 2015

If you've got a Xamarin project that has linking enabled, it's likely you've modified your project properties to pass an additional mtouch argument as follows: --xml=${ProjectDir}/linker.xml Recently (maybe due to an update, or maybe due to switching from Xamarin Studio to Visual Studio) this starting balking for me with an error like this: Error Extra linker definitions file &#

 
12 hours later…
18:31
@BradleyDotNET on second thought going to try implement Ioc
as I'm not sure about the Factory method
19:13
hi

« first day (876 days earlier)      last day (3273 days later) »