Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SurfaceDialMenuItemCustom.cs
var controller = RadialController.CreateForCurrentView();
controller.RotationResolutionInDegrees = 0.2;
controller.UseAutomaticHapticFeedback = false;
var mapZoomItem = RadialControllerMenuItem.CreateFromFontGlyph("El Bruno - Maps Zoom", "\xE128", "Segoe MDL2 Assets");
var mapRotationItem = RadialControllerMenuItem.CreateFromFontGlyph("El Bruno - Map Rotation", "\xE128", "Segoe MDL2 Assets");
var disableDialItem = RadialControllerMenuItem.CreateFromFontGlyph("El Bruno - Disable Dial", "\xE128", "Segoe MDL2 Assets");
controller.Menu.Items.Add(mapZoomItem);
controller.Menu.Items.Add(mapRotationItem);
controller.Menu.Items.Add(disableDialItem);
var surfaceDialConfiguration = RadialControllerConfiguration.GetForCurrentView();
surfaceDialConfiguration.SetDefaultMenuItems(new List<RadialControllerSystemMenuItemKind>{});
// Add 2 default system buttons
//surfaceDialConfiguration.SetDefaultMenuItems(new[] {
// RadialControllerSystemMenuItemKind.Volume,
// RadialControllerSystemMenuItemKind.NextPreviousTrack
//});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment