Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello,

i Want to hide a row Definition programmatically from Grid in WPF in C#.
Posted
Comments
Naz_Firdouse 8-Jun-15 9:11am    
what have you tried so far...
please share your code
[no name] 9-Jun-15 8:03am    
foreach (PropertyInfo p in typeof(CBSConfig).GetProperties())
{
RowDefinition rd = new RowDefinition();
rd.Name = "RD"+p.Name;
bool IsVisible = Convert.ToBoolean(p.GetValue(config,null));
if (IsVisible)
{
//// Here i want a line of code which will hide my Row Definitions////
}
else
{

}
}
Naz_Firdouse 10-Jun-15 9:30am    
Here you are creating a new row...but where it is getting added?
One way to hide is set GridLength to 0 like rd.Height= new GridLength(0);

1 solution

Hi,

Have you seen this?

LG
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900