Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to re-index dynamically added GridSplitter with string Name
Firstly, I use Grid.SetRow(), but It returns null
I found another way named SetValue and want to use this,
but it's hard to access GridSplitter with string Name
This is what i tried
GridSplitter leftSplitter = FindName(splitterL) as GridSplitter; SetValue(leftSplitter, i); //another way string splitterL = "splitterL" + i.ToString(); SetValue((GridSplitter)splitterL, i); //returns null GridSplitter leftSplitter = FindName(splitterL) as GridSplitter; Grid.SetRow(leftSplitter, i);
But with SetValue, can't change GridSplitter to DependencyProperty
Is there a way to solve this? Or other way, Please let me know thanks!
Hi,@vitaminP .Could you show your complete code? Is there a screenshot showing the expected effect?