This project is read-only.
2
Vote

MilSymbol.scaleFactor needs to be defaulted to 1.0

description

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...

comments

jlued wrote Jul 5, 2012 at 3: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))
            {
                this.SetScaleFactor(value);
            }
out of the Scale Property setter since it is not always executed and into the GenerateSymbol method.

wrote Jul 5, 2012 at 3:44 PM

jlued wrote Jul 5, 2012 at 10:50 PM

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

wrote Feb 14, 2013 at 7:22 PM