Exemplo n.º 1
0
 private bool IsIconNodeApply(string str, SwitchIconView iconView)
 {
     if (string.IsNullOrEmpty(str))
     {
         return(true);
     }
     return(((SwitchIconModel)iconView.DataContext).Icon.ToLower().Contains(str));
 }
Exemplo n.º 2
0
 private static SwitchIconView Resolve(string icon)
 {
     if (CachedControls.ContainsKey(icon))
     {
         var control = CachedControls[icon];
         var parent  = control.Parent as StackPanel;
         parent.Children.Remove(control);
         return(control);
     }
     else
     {
         var control = new SwitchIconView();
         CachedControls.Add(icon, control);
         return(control);
     }
 }