This is a migrated thread and some comments may be shown as answers.

RadBorder.CascadeInputTransparent not behaving as expected

2 Answers 25 Views
Border
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 01 Feb 2019, 06:43 PM

I am using Xamarin.Controls.SignaturePad.Forms, and using the signature pad inside of a grid to have action buttons along the bottom. When doing so, it is necessary to use InputTransparent="True" and CascadeInputTransparent="False" in order for the SignaturePadView to allow the user to draw their signature as well as the buttons to still remain clickable.

I would like to wrap this inside a RadBorder, but it appears that there are inaccessible child views in the RadBorder before the "Content" inside the border, so CascaseInputTransparent = "False" seems to be causing possibly private inner views of the RadBorder (before my grid) to have InputTransparent default to "False" even though I want the border (and all child elements before my content) to be "True". Leaving CascadeInputTransparent as "True" (the default) causes the buttons to not be clickable. Removing InputTransparent="True" causes the SignaturePad to not track the user's finger and draw the signature.

THE QUESTION:

Is there currently a way to access any child views of the RadBorder before the nested content? If not, maybe this is more of a bug report instead of a question, or a helpful workaround for someone else that may encounter the error. Obviously, it would be nice if RadBorder handled these two settings as if it were one view and the cascade passed through as expected. I'm just guessing that there is an underlying system of nested views to make the RadBorder so awesome, and that they are not inheriting the settings for these items from the parent view.

<!-- this code works -->

<Grid Grid.Row="0" Grid.Column="0" HorizontalOptions="Center"  VerticalOptions="Center" 
                    HeightRequest="400" WidthRequest="600" Padding="50"
                    Opacity="1" InputTransparent="True" CascadeInputTransparent="False">
                <Grid.RowDefinitions>
                    <RowDefinition Height="3*"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <signature:SignaturePadView x:Name="PadView"
                                            Grid.Row="0"
                                            Grid.ColumnSpan="3"
                                        HeightRequest="300"
                                        WidthRequest="500"
                                        BackgroundColor="White"
                                        CaptionText="Signature" 
                                        CaptionTextColor="Black"
                                        ClearText="Clear" 
                                        ClearTextColor="Red"
                                        PromptText="Please Sign" 
                                        PromptTextColor="Red"
                                        SignatureLineColor="Aqua" 
                                        StrokeColor="Black" 
                                        StrokeWidth="2"/>


                <Button x:Name="CancelButton"
                        Text="Cancel"
                        Grid.Row="1"
                        Grid.Column="0"
                        TextColor="White"
                        BackgroundColor="Red"
                        Clicked="OnClickedCancel"
                        />

                <Button x:Name="ClearButton"
                        Text="Clear"
                        Grid.Row="1"
                        Grid.Column="1"
                        TextColor="White"
                        BackgroundColor="Silver"
                        Clicked="OnClickedClear"
                        />

                <Button x:Name="ContinueButton" 
                        Text="CONTINUE"
                        Grid.Row="1"
                        Grid.Column="2"
                        TextColor="White"
                        BackgroundColor="Silver"
                        Clicked="OnClickedContinue"
                        />
            </Grid>

<!-- wrapping the above inside of this RadBorder does not -->
<telerikPrimitives:RadBorder InputTransparent="True" CascadeInputTransparent="False" BackgroundColor="White" 
                                         HorizontalOptions="CenterAndExpand" VerticalOptions="Center"
                                         HeightRequest="400" WidthRequest="600" 
                                         Padding="50" CornerRadius="10">

<!-- the above grid code -->

</telerikPrimitives:RadBorder>

 

My workaround was to put both of these above into another grid, both at Row=0, Col=0 so that they would overlay, but then resizing the content becomes more tedious because I am having to set the width and height and padding between two separate overlays instead of just having it nested inside your RadBorder.

<Grid>

    <telerikPrimitives:RadBorder Grid.Row="0" Grid.Col="0" WidthRequest="500" HeightRequest="400" BackgroundColor=

                        White" HorizontalOptions="Center" VerticalOptions="Center"></telerikPrimitives:RadBorder>

   <Grid Grid.Row="0" Grid.Col="0" BackgroundColor="White"

           WidthRequest="400" HeightRequest="300" BackgroundColor="White" HorizontalOptions="Center" VerticalOptions="Center">

      <!-- Grid stuff w/ sig pad and buttons -->

   

   </Grid><!-- inner grid -->

 

</Grid><!-- outer grid -->

 

 

2 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 01 Feb 2019, 06:47 PM
I forgot at the very bottom of the last post, in my workaround, I have InputTransparent="True" and CascadeInputTransparent="False" on both of the <Grid> elements.
0
Didi
Telerik team
answered on 05 Feb 2019, 11:58 AM
Hi John,

Thank you for the provided code.

I have tested the described scenario with the RadBorder control and I could not reproduce the issue with the Button Click event. I have changed the InputTransparent and CascadeInputTransparent values but on my side the Button Click event is fired. In this case may I ask you to check the attached project if I am missing something and could you please modify it regarding your setup where the issue could be reproduced and send it back to me? In this way I could research the concrete scenario further. Also please note that you should open a support ticket and attach the project there because in the forum only image attachments are allowed. 

Indeed of a great help could be the following information:

- on which platform/devices the issue could be reproduced.
- versions of Telerik UI for Xamarin and Xamarin.Forms used in the project.
- versions of Xamarin.Android SDK, Xamarin.iOS SDK and Visual Studio 

Thank you in advance and I am looking forward to your reply.

Regards,
Didi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Border
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Didi
Telerik team
Share this question
or