コード例 #1
0
        public SignaturePadServicePage()
        {
            InitializeComponent();

            var signatureConfiguration = this.Resolve().CurrentConfig;

            //Main Content
            LayoutRoot.Background = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(Color.Black));

            #region SignaturePadControl Setup
            signaturePad = new SignaturePadControl();
            signaturePad.BackgroundColor = PlatformConverters.FormsToWindowsColor(signatureConfiguration.SignatureBackgroundColor);
            signaturePad.Caption.Text = signatureConfiguration.CaptionText;
            signaturePad.Caption.Foreground = PlatformConverters.BrushFromColor(signatureConfiguration.CaptionTextColor);
            signaturePad.ClearLabel.Text = signatureConfiguration.ClearText;
            signaturePad.ClearLabel.Foreground = PlatformConverters.BrushFromColor(signatureConfiguration.ClearTextColor);
            signaturePad.SignaturePrompt.Text = signatureConfiguration.PromptText;
            signaturePad.SignaturePrompt.Foreground = PlatformConverters.BrushFromColor(signatureConfiguration.PromptTextColor);
            signaturePad.Stroke = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.StrokeColor));
            signaturePad.StrokeWidth = (int)signatureConfiguration.StrokeWidth;
            signaturePad.Margin = new Windows.UI.Xaml.Thickness(0, 0, 0, 39);
            LayoutRoot.Children.Insert(0, (signaturePad));
            #endregion

            //Save Button Setup
            SaveButton.Content = signatureConfiguration.SaveText;
            SaveButton.Foreground = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.SaveTextColor));
            SaveButton.Background = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.SaveButtonColor));

            //Cancel Button Setup
            CancelButton.Content = signatureConfiguration.CancelText;
            CancelButton.Foreground = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.CanceTextColor));
            CancelButton.Background = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.CanceButtonColor));
        }
コード例 #2
0
        public SignaturePadServicePage()
        {
            InitializeComponent();

            var signatureConfiguration = this.Resolve().CurrentConfig;

            //Main Content
            LayoutRoot.Background = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(Color.Black));

            #region SignaturePadControl Setup
            signaturePad = new SignaturePadControl();
            signaturePad.BackgroundColor            = PlatformConverters.FormsToWindowsColor(signatureConfiguration.SignatureBackgroundColor);
            signaturePad.Caption.Text               = signatureConfiguration.CaptionText;
            signaturePad.Caption.Foreground         = PlatformConverters.BrushFromColor(signatureConfiguration.CaptionTextColor);
            signaturePad.ClearLabel.Text            = signatureConfiguration.ClearText;
            signaturePad.ClearLabel.Foreground      = PlatformConverters.BrushFromColor(signatureConfiguration.ClearTextColor);
            signaturePad.SignaturePrompt.Text       = signatureConfiguration.PromptText;
            signaturePad.SignaturePrompt.Foreground = PlatformConverters.BrushFromColor(signatureConfiguration.PromptTextColor);
            signaturePad.Stroke      = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.StrokeColor));
            signaturePad.StrokeWidth = (int)signatureConfiguration.StrokeWidth;
            signaturePad.Margin      = new Windows.UI.Xaml.Thickness(0, 0, 0, 39);
            LayoutRoot.Children.Insert(0, (signaturePad));
            #endregion

            //Save Button Setup
            SaveButton.Content    = signatureConfiguration.SaveText;
            SaveButton.Foreground = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.SaveTextColor));
            SaveButton.Background = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.SaveButtonColor));

            //Cancel Button Setup
            CancelButton.Content    = signatureConfiguration.CancelText;
            CancelButton.Foreground = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.CanceTextColor));
            CancelButton.Background = new SolidColorBrush(PlatformConverters.FormsToWindowsColor(signatureConfiguration.CanceButtonColor));
        }