View mode dialog

This tutorial only applies to Xamarin.Android.

Using ViewModePickerDialogFragment in Xamarin.Android is identical to using ViewModePickerDialogFragment in Android. See tutorial here.

For example, the equivalent of the example provided in the Android guide will be:

var viewModeDialog = pdftron.PDF.Dialog.ViewModePickerDialogFragment.NewInstance(mPdfViewCtrl.PagePresentationMode,
    false, mReflowControl.Visibility == ViewStates.Visible, 0);
viewModeDialog.SetStyle((int)DialogFragmentStyle.Normal, Resource.Style.CustomAppTheme);
viewModeDialog.Show(this.SupportFragmentManager, "view_mode_picker");

viewModeDialog.CustomColorModeSelected += (sender, e) =>
    // save the selection so we can retrieve it next time
    PdfViewCtrlSettingsManager.SetCustomColorModeBGColor(this, e.BgColor);
    PdfViewCtrlSettingsManager.SetCustomColorModeTextColor(this, e.TxtColor);
    PdfViewCtrlSettingsManager.SetColorMode(this, PdfViewCtrlSettingsManager.KeyPrefColorModeCustom);
    // Do something with e.BgColor and e.TxtColor

viewModeDialog.ViewModeColorSelected += (sender, e) =>
    // save the selection so we can retrieve it next time
    PdfViewCtrlSettingsManager.SetColorMode(this, e.ColorMode);
    // Do something with e.ColorMode

viewModeDialog.ViewModeSelected += (sender, e) =>
    // Do something with e.ViewMode
To learn about setting page presentation mode, see PDFViewCtrl page presentation mode.
To learn about setting page color mode, see PDFViewCtrl color modes.
To learn about reflow, see reflow.
To learn about cropping pages, see crop page dialog.