Xaml – Add and Update Row Definitions

XAML-LOGO Row and Column Definitions are used to set the rows and columns in a grid on a xaml page. I wanted to add or remove any of these definitions from the code behind using C#. Next is the solution:

Add Row Definitions:

RowDefinitionCollection defs = myGrid.RowDefinitions;
defs.Add(newRowDefinition(){Height=newGridLength(140)});
defs.Add(newRowDefinition(){Height=newGridLength(1,GridUnitType.Star)});

Update Row Definitions:

RowDefinitionCollection defs = myGrid.RowDefinitions;
defs[0] = newRowDefinition(){Height=newGridLength(140)};
defs[1] = newRowDefinition(){Height=newGridLength(1,GridUnitType.Star)};

 

To add and update columns, just change RowDefinition with ColumnDefinition in the above code. Hope this helps you in your Windows Phone and Windows Store apps! Happy Xamling!

Nokia’s New Lumia 620 and Lumia 505

On Wednesday, Nokia announced a new Windows Phone 8 member at LeWeb 2012 in Paris, the Lumia 620. The entry-level handset has the following specs:

  • 3.8-inch TFT screen at WVGA resolution (800 x 480)
  • 1GHz dual-core Snapdragon S4 Plus processor
  • 512MB RAM
  • 8GB of internal storage
  • expandable by microSD (up to 64GB cards supported)
  • 5-megapixel shooter with LED flash capable of recording 720p video
  • Front VGA camera is for those self-portraits
  • WiFi or WCDMA 3G
  • NFC & Bluetooth 3.0 taking care of all your sharing and pairing

It also has a “Dual-shot color” Continue reading