public MessageContentBodyWithCode() { InitializeComponent(); // On Desktop platform, Label can be selected if (Helper.IsDesktopPlatform()) { SelectableLabelEffect.SetEnabled(Label, true); } this.BindingContextChanged += MessageContentBodyWithCode_BindingContextChanged; }
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); } } }