WPF: Get Button Size in pixels

Viewed 45

I have a WPF app and simply want to get the dimensions in pixels of the button sizes. I have a List that I iterate but I'm getting 0x0 (when using ActualHeight/ActualWidth) or NaNxNaN (when using Height/Width) for the sizes.

buttonList.ForEach(x=> buttonSizereport.Add(string.Format("Button {0} is {1}x{2} pixels", x.Name, x.Width, x.Height)));
0 Answers
Related