private void SetDefaultItems() { RadialControllerConfiguration radialControllerConfig; IRadialControllerConfigurationInterop radialControllerConfigInterop = (IRadialControllerConfigurationInterop)System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal.GetActivationFactory(typeof(RadialControllerConfiguration)); Guid guid = typeof(RadialControllerConfiguration).GetInterface("IRadialControllerConfiguration").GUID; radialControllerConfig = radialControllerConfigInterop.GetForWindow(new WindowInteropHelper(this).Handle, ref guid); radialControllerConfig.SetDefaultMenuItems(new[] { RadialControllerSystemMenuItemKind.Volume, RadialControllerSystemMenuItemKind.Scroll }); radialControllerConfig.TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind.Scroll); }
private void Select_Volume(object sender, RoutedEventArgs e) { config = RadialControllerConfiguration.GetForCurrentView(); config.TrySelectDefaultMenuItem(RadialControllerSystemMenuItemKind.Volume); }