// x=rcosθ and y=rsinθ. private void CreateViewFromTop(int i, IActionMenuData actionMenuData) { var button = new Frame(); button.Height = 100; button.Width = 100; double per = (Math.PI / 2) - ((angle_) * i); button.Margin = angled(radius, per); //button.Content = actionMenuData.Name; //button.Loc //button. button.Background = new SolidColorBrush(Colors.Gold); Children.Add(button); }
private void CreateView(double angle, IActionMenuData actionMenuData, Color color) { System.Diagnostics.Debug.WriteLine($"{actionMenuData.Name} {angle}"); var button = new Frame(); button.Height = 100; button.Width = 100; var label = new Label(); label.Height = 100; label.Width = 100; label.VerticalContentAlignment = System.Windows.VerticalAlignment.Center; label.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Center; label.Content = actionMenuData.Name; button.Navigate(label); button.Margin = angled(this.radius, angle); //button.Content = actionMenuData.Name; //button.Loc //button. button.Background = new SolidColorBrush(color); Children.Add(button); }