コード例 #1
0
 public FrameworkElementWrapper(FrameworkElement element, HereString hereString, FrameworkElementWrapper parent = null)
 {
     Element = element;
     XamlDeclaration = hereString;
     Icon = IconMappings.ContainsKey(element.GetType().Name)
         ? IconMappings[element.GetType().Name]
         : IconMappings["Element"];
     GenerateChildren();
     Parent = parent;
     EventMappings = new Dictionary<string, PsEventHandler>();
     var events = element.GetType().GetEvents();
     foreach (var eventInfo in events)
     {
         EventMappings.Add(eventInfo.Name, null);
     }
 }
コード例 #2
0
 public List<StringWrapper> GenerateElementDeclarations(HereString hereString)
 {
     //potential placeholder value
     var xaml = new FrameworkElementWrapper((Window) XamlReader.Parse(hereString.Value), hereString);
     return CreateDeclarationsHelper($"{hereString.Name}_Form", xaml);
 }