Example #1
0
        public MessageContentBodyWithCode()
        {
            InitializeComponent();

            // On Desktop platform, Label can be selected
            if (Helper.IsDesktopPlatform())
            {
                SelectableLabelEffect.SetEnabled(Label, true);
            }

            this.BindingContextChanged += MessageContentBodyWithCode_BindingContextChanged;
        }
Example #2
0
        protected override void OnAttached()
        {
            if (Control != null)
            {
                if (Control is TextBlock)
                {
                    TextBlock textBlock = (TextBlock)Control;

                    // Store base value
                    baseValue = textBlock.IsTextSelectionEnabled;

                    textBlock.IsTextSelectionEnabled = SelectableLabelEffect.GetEnabled(Element);
                }
            }
        }