You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I change
<userControl:RadialMenu Visibility="Collapsed"
then close the Xaml and reopen, then change:
<userControl:RadialMenu Visibility="Visible"
the center button position is not center.
When write a program with Collapsed Radial menu and a button event chanve the Visibility prop. to visible, has a same problem. The center button is not centered.
I ran into the same problem as well.
After some diggings, I found out that the cause is using CenterButton.ActualHeight and CenterButton.ActualWidth properties to calculation its position.
However, these two properties' values will not be populated until the button itself has been rendered once which is not going to happen until you set the radial menu to visible.
A hotfix I came up with is to change everywhere inside RadialMenu.xaml.cs that uses CenterButton.ActualHeight and CenterButton.ActualWidth to CenterButton.Height.
Because inside RadialMenu.xaml, CenterButton.Height is bind to CenterButtonSize instead of being set to auto or some default value, the value of CenterButton.ActualHeight should just be the same as CenterButton.Height regardless of a template or style being used or not.
If I change
<userControl:RadialMenu Visibility="Collapsed"
then close the Xaml and reopen, then change:
<userControl:RadialMenu Visibility="Visible"
the center button position is not center.
When write a program with Collapsed Radial menu and a button event chanve the Visibility prop. to visible, has a same problem. The center button is not centered.
sample image
The text was updated successfully, but these errors were encountered: