I developed a custom tool and a custom behaviour using ArcGIS API for Silverlight and I have created a custom unique value renderer in the behavior.cs file where I also define my feature layer and intialized it but I have created the symbol in the user control.resources in XAML file and I accessed them from the code behind as suggested in the sharepoint Help document, and it works fine when I debug it in using visual studio template, but when I add it to Sharepoint the symbol is not showing.
UniqueValueInfo uValinfoApproved = new UniqueValueInfo(); uValinfoApproved.Symbol = locateAddDialog.Resources["GreenStickPinSymbol"] as Symbol; uValinfoApproved.Value = "Approved";
UniqueValueInfo uValInfoDenied = new UniqueValueInfo(); uValInfoDenied.Symbol = locateAddDialog.Resources["RedStickPinSymbol"] as Symbol; uValInfoDenied.Value = "Denied";
UniqueValueInfo uValInfoPending = new UniqueValueInfo(); uValInfoPending.Symbol = locateAddDialog.Resources["YellowStickPinSymbol"] as Symbol; uValInfoPending.Value = "Pending";
UniqueValueRenderer PlanStatusRenderer = new UniqueValueRenderer() { Field = "PLAN_STATUS", DefaultSymbol = locateAddDialog.Resources["YellowStickPinSymbol"] as Symbol }; PlanStatusRenderer.Infos.Add(uValinfoApproved); PlanStatusRenderer.Infos.Add(uValInfoDenied); PlanStatusRenderer.Infos.Add(uValInfoPending);
if (locateAddDialog == null) locateAddDialog = new LocateAddressDialog(); Map currentMap = MapApplication.Current.Map; if (currentMap != null) { if (prePlanfs == null) { prePlanfs = currentMap.Layers["prePlanAdd"] as FeatureLayer;
You certainly can access symbols from control.resources. Where are you defining the red and green stick pin symbol within your XAML, as I don't see that in your sample?