MilSymbol.scaleFactor needs to be defaulted to 1.0


If you use a MilSymbol in XAML, you need to have the scaleFactor defaulted to 1 or you can't set various values through XAML, because it is using the default constructor.
To test, just put a MilSymbol in a XAML file and then try to change the scale, it disappears because scaleFactor is 0.0.
Just give scaleFactor a default of 1.0 and all is well...


jlued wrote Jul 5, 2012 at 2:39 PM

I think the issue with this is that you have some code that executes in the property Scale that does not get executed when you modify the Scale property in XAML. You need to move this

// A side effect of changing the symbol code is that we might need
            // a new scale factor.
            if (!string.IsNullOrEmpty(this.SymbolCode))
out of the Scale Property setter since it is not always executed and into the GenerateSymbol method.

wrote Jul 5, 2012 at 2:44 PM

jlued wrote Jul 5, 2012 at 9:50 PM

Sorry...the offending code is in the SymbolCode property..not the Scale property.

wrote Feb 14, 2013 at 6:22 PM