Skip to content

Instantly share code, notes, and snippets.

@elbruno
Created October 23, 2017 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elbruno/10fb6c0bd2af552ac3f6b6e533963356 to your computer and use it in GitHub Desktop.
Save elbruno/10fb6c0bd2af552ac3f6b6e533963356 to your computer and use it in GitHub Desktop.
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