Note that there are some explanatory texts on larger screens.

plurals
  1. PONot enough quota is available to process this command. (Exception from HRESULT: 0x80070718) in windows 8 metro app for GRID(Not for GRIDVIEW)
    text
    copied!<p>I am trying to generate dynamic controls in grid through UI where am dynamically specifying the size of controls. while generating more then 1500 control it is throwing this error "Not enough quota is available to process this command. (Exception from HRESULT: 0x80070718) " . i have seen some solution for gridview for the same exception but i am using GRID so not beneficial for me . </p> <p>please let me know.</p> <p>Thanks in advance.</p> <pre><code> &lt;ScrollViewer HorizontalScrollMode="Auto" HorizontalScrollBarVisibility="Auto" VerticalScrollMode="Auto" VerticalScrollBarVisibility="Auto" Margin="232,10,267,0" Grid.Row="1"&gt; &lt;Grid Name="dynamicgrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="LightBlue" Height="Auto" Width="Auto" Grid.Row="1"/&gt; &lt;/ScrollViewer&gt; C# code try { MainPage mainpage = (MainPage)e.Parameter; buttons = Convert.ToInt32(mainpage.buttonsize); textblock = Convert.ToInt32(mainpage.txtBlocksize); textbox = Convert.ToInt32(mainpage.txtBoxsize); rows = Convert.ToInt32(mainpage.rows); buttonwidth = Convert.ToInt32(mainpage.buttonwidth); textblockwidth = Convert.ToInt32(mainpage.txtBlockwidth); textboxwidth = Convert.ToInt32(mainpage.txtBoxwidth); grdcolumn = buttons + textblock + textbox; for (int i = 0; i &lt; rows; i++) { RowDefinition rowDef = new RowDefinition(); rowDef.Height = new GridLength(200, GridUnitType.Auto); dynamicgrid.RowDefinitions.Add(rowDef); } for (int j = 0; j &lt; grdcolumn; j++) //need to mention { ColumnDefinition colDef1 = new ColumnDefinition(); colDef1.Width = new GridLength(100, GridUnitType.Auto); dynamicgrid.ColumnDefinitions.Add(colDef1); } for (textboxcolumncount = 0; textboxcolumncount &lt; textbox; textboxcolumncount++) { for (int i = 0; i &lt; rows; i++)//textbox { TextBox txtbox = new TextBox(); txtbox.SetValue(TextBox.TextProperty, "txtbox" + i.ToString()); txtbox.Width = textboxwidth; txtbox.Height = 50; txtbox.SetValue(Grid.ColumnProperty, textboxcolumncount); txtbox.SetValue(Grid.RowProperty, i); dynamicgrid.Children.Add(txtbox); dynamicgrid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); } } textboxcolumncount = textbox; for (textblockcolumncount = textboxcolumncount; textblockcolumncount &lt; (grdcolumn - (buttons)); textblockcolumncount++) { for (int i = 0; i &lt; rows; i++) { TextBlock txtblock = new TextBlock(); txtblock.SetValue(TextBlock.NameProperty, "txtblock" + i.ToString()); txtblock.Width = textblockwidth; txtblock.Height = 50; txtblock.SetValue(Grid.ColumnProperty, textblockcolumncount); txtblock.SetValue(Grid.RowProperty, i); txtblock.Text = "TextBlock" + i.ToString(); txtblock.Foreground = new SolidColorBrush(Colors.Black); dynamicgrid.Children.Add(txtblock); dynamicgrid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); } } textboxcolumncount = textblockcolumncount; for (buttonCoulmncount = textboxcolumncount; buttonCoulmncount &lt; (grdcolumn); buttonCoulmncount++) { for (int i = 0; i &lt; rows; i++) //button { Button btn = new Button(); btn.SetValue(Button.NameProperty, "btn" + i.ToString()); btn.Content = "Button" + i.ToString(); btn.Width = textboxwidth; btn.Height = 50; btn.Foreground = new SolidColorBrush(Colors.Black); btn.SetValue(Grid.RowProperty, i); btn.SetValue(Grid.ColumnProperty, buttonCoulmncount); dynamicgrid.Children.Add(btn); dynamicgrid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); } } } catch (Exception ex) { throw ex; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload