Ejemplo n.º 1
0
        private void SetHeadersGrid()
        {
            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);

            view.GridColsView = new ObservableList <GridColView>();

            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ActInputValue.Param), Header = "Header", WidthWeight = 150
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ActInputValue.Value), Header = "Value", WidthWeight = 150
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = "...", WidthWeight = 30, StyleType = GridColView.eGridColStyleType.Template, CellTemplate = (DataTemplate)this.pageGrid.Resources["HttpHeadersValueExpressionButton"]
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(ActInputValue.ValueForDriver), Header = "Replace With Value For Driver", WidthWeight = 150, BindingMode = BindingMode.OneWay
            });

            HttpHeadersGrid.SetAllColumnsDefaultView(view);
            HttpHeadersGrid.InitViewItems();

            HttpHeadersGrid.DataSourceList = mActREST.HttpHeaders;
        }
Ejemplo n.º 2
0
        private void SetHTTPHeadersGrid()
        {
            HttpHeadersGrid.Title = "Request Headers";
            HttpHeadersGrid.SetTitleStyle((Style)TryFindResource("@ucGridTitleLightStyle"));

            GridViewDef view = new GridViewDef(GridViewDef.DefaultViewName);

            view.GridColsView = new ObservableList <GridColView>();
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(APIModelKeyValue.Param), Header = "Header", WidthWeight = 100
            });
            view.GridColsView.Add(new GridColView()
            {
                Field = nameof(APIModelKeyValue.Value), Header = "Value", WidthWeight = 100
            });

            HttpHeadersGrid.SetAllColumnsDefaultView(view);
            HttpHeadersGrid.InitViewItems();
            HttpHeadersGrid.DataSourceList = mApplicationAPIModel.HttpHeaders;

            HttpHeadersGrid.ShowRefresh = Visibility.Collapsed;
            HttpHeadersGrid.ShowUpDown  = Visibility.Collapsed;
            HttpHeadersGrid.ShowEdit    = Visibility.Collapsed;

            HttpHeadersGrid.btnAdd.RemoveHandler(Button.ClickEvent, new RoutedEventHandler(AddHttpHeaderRow));
            HttpHeadersGrid.btnAdd.AddHandler(Button.ClickEvent, new RoutedEventHandler(AddHttpHeaderRow));
        }