开发者

How to apply style in WPF Grid's first row at run time

How to apply style in WPF Grid's first row a开发者_如何学Ct run time.


Just do this -

    Style style = new Style(typeof(RowDefinition));
    style.Setters.Add(new Setter(RowDefinition.HeightProperty, 10));

    yourGrid.RowDefinitions[0].Style = style;

Update:

You can use FrameworkElement.FindResource Method to find your style.

Check this for more details -

Resources and Code

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜