Inheritance: BaseListDescription
示例#1
0
 public virtual ListLayoutDescription ToListLayoutDescription()
 {
     var list = new ListLayoutDescription();
     base.Fill(list);
     if (ItemsSource != null)
     {
         var itemsSource = ItemsSource.GetPropertyText();
         list.Properties["ItemsSource"] = string.Format("@MvxBind:{{'Path':'{0}'}}", itemsSource);
     }
     if (SelectedCommand != null)
     {
         var selectedCommand = SelectedCommand.GetPropertyText();
         list.Properties["ItemClick"] = string.Format("@MvxBind:{{'Path':'{0}'}}", selectedCommand);
     }
     if (DefaultLayout != null)
     {
         list.DefaultLayout = DefaultLayout.ToListItemDescription();
     }
     foreach (var kvp in ItemLayouts)
     {
         list.ItemLayouts[kvp.Key] = kvp.Value.ToListItemDescription();
     }
     return list;
 }
示例#2
0
 public virtual ListLayoutDescription ToListLayoutDescription()
 {
     var list = new ListLayoutDescription();
     base.Fill(list);
     if (this.ItemsSource != null)
     {
         var itemsSource = this.ItemsSource.GetPropertyText();
         list.Properties["ItemsSource"] = $"@MvxBind:{itemsSource}";
     }
     if (this.SelectedCommand != null)
     {
         var selectedCommand = this.SelectedCommand.GetPropertyText();
         list.Properties["ItemClick"] = $"@MvxBind:{selectedCommand}";
     }
     if (this.DefaultLayout != null)
     {
         list.DefaultLayout = this.DefaultLayout.ToListItemDescription();
     }
     foreach (var kvp in this.ItemLayouts)
     {
         list.ItemLayouts[kvp.Key] = kvp.Value.ToListItemDescription();
     }
     return list;
 }