Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
Gridview and MvvMCross
posted

Does anyone have experience with binding Infragistics controls using MvvmCross? I think a simple example to start out with might be the SingleRow example below. Any suggestions on binding the datasource or other properties using MvvmCross?

  [Register("SingleRowView")]
    public class SingleRowView : MvxView
    {
        public IGGridView GridView;
        private IGGridViewImageColumnDefinition _col;
        public IGGridViewSingleRowSingleFieldDataSourceHelper Ds;
 
        public SingleRowView()
        {
            Initialize();
        }
 
        public SingleRowView(RectangleF bounds)
            : base(bounds)
        {
            Initialize();
        }
 
        void Initialize()
        {
            BackgroundColor = UIColor.Black;
            GridView = new IGGridView(new RectangleF(0f,0f, Frame.Size.Width, 100f), IGGridViewStyle.IGGridViewStyleDefault)
                {
                    AutoresizingMask = UIViewAutoresizing.FlexibleBottomMargin | UIViewAutoresizing.FlexibleTopMargin |
                                       UIViewAutoresizing.FlexibleWidth,
                    SelectionType = IGGridViewSelectionType.IGGridViewSelectionTypeCell,
                    HeaderHeight = 0f,
                    EmptyRows = false,
                    RowSeparatorHeight = 0,
                    AllowHorizontalBounce = true,
                    AlwaysBounceVertical = false,
                    RowHeight = 100f,
                    ColumnWidth = new IGColumnWidth(),
                    Theme = new IGGridViewLightTheme()
                };
 
            _col = new IGGridViewImageColumnDefinition(@"Image",
                                                      IGGridViewImageColumnDefinitionPropertyType
                                                          .IGGridViewImageColumnDefinitionPropertyTypeImage);
            Ds = new IGGridViewSingleRowSingleFieldDataSourceHelper(_col);
            GridView.DataSource = Ds;
        }
    }
Parents Reply Children
No Data