Thanks for all the info Jennifer!Good to know on number 1 and I got number 3 worked out...Still working on number 2; I am looping through each graphic trying to change it's Symbol.ControlTemplate. I understand how the VisualStates work, but not real sure how to copy a ControlTemplate and inject a VisualState into it.... also, the Symbol needs a ScaleTransform, how do I inject that?Here are a few things I was trying but don't work:
DependencyObject symbolDependencyObject = graphic.Symbol.ControlTemplate.LoadContent();
FrameworkElement symbolFrameworkElement = symbolDependencyObject as FrameworkElement;
symbolFrameworkElement.RenderTransform = new ScaleTransform(50, 50); //Scaling big initially just to see if scale works
var storyboard = new Storyboard();
var doubleAnimation = new DoubleAnimation(50, 1, new Duration(TimeSpan.Zero));
Storyboard.SetTarget(doubleAnimation, symbolFrameworkElement);
Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath("RenderTransform.ScaleX"));
storyboard.Children.Add(doubleAnimation);
var storyboard2 = new Storyboard();
var doubleAnimation2 = new DoubleAnimation(1, 50, new Duration(TimeSpan.Zero));
Storyboard.SetTarget(doubleAnimation2, symbolFrameworkElement);
Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath("RenderTransform.ScaleX"));
storyboard2.Children.Add(doubleAnimation2);
var stateGroup = new VisualStateGroup { Name = "MouseOverState" };
stateGroup.States.Add(new VisualState { Name = "MouseOut", Storyboard = storyboard });
stateGroup.States.Add(new VisualState { Name = "MouseOver", Storyboard = storyboard2 });
var sgs = VisualStateManager.GetVisualStateGroups(symbolFrameworkElement);
sgs.Add(stateGroup);
I also tried just adding a trigger, but again do not have a ScaleTransform plus it throws this error "After a 'TriggerCollection' is in use (sealed), it cannot be modified.", so guess this is a no go.
Trigger trigger = new Trigger();
trigger.Property = FrameworkElement.IsMouseOverProperty;
trigger.Value = true;
Setter setter = new Setter();
setter.Property = ScaleTransform.ScaleXProperty;
setter.Value = 50;
trigger.Setters.Add(setter);
graphic.Symbol.ControlTemplate.Triggers.Add(trigger);
Still poking around this code, but any help or ideas would be great! Thanks!And with number 4, there really isn't anything special with the code; the map is referencing some internal services and some ESRI services. It has something to do with our network here I think. When ESRI started using the Amazon cloud, it dynamically routes traffic so services.arcgisonline.com will give different IPs. Some of these IPs were in our routers block list, after allowing them this hanging of the layers loading went down drastically. It still happens every once in a while (a lot yesterday though) and I think it now is some issue with our proxy. I have our network guys looking into it (kind of hard though since it is temperamental). Anyway, I guess the only question I have is if there is a way to set/control the timeout of a layer? Maybe I can set it to give up after 15 seconds or something? So at least other layers can then load.Thanks a ton for all your great help!