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

Exception when touching MaskedInput control

6 Answers 83 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 06 Aug 2014, 12:23 PM
Hi,

We have recently updated our Telerik controls for one of our applications. The current version used is 2014.1.0224.40. What we noticed on touch devices is that exceptions are being raised when the MaskedInput control is being touched. There is no exception raised when the control is being clicked.

The exception is:
,. hexadecimal value 0x00, is an invalid character

The stacktrace:
   bij System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(Int32 ch, Char* pDst, Boolean entitize)
   bij System.Xml.XmlEncodedRawTextWriter.WriteAttributeTextBlock(Char* pSrc, Char* pSrcEnd)
   bij System.Xml.XmlEncodedRawTextWriter.WriteString(String text)
   bij System.Xml.XmlWellFormedWriter.WriteString(String text)
   bij Telerik.Windows.Automation.Peers.AutomationXmlSerializer.Serialize(IEnumerable`1 properties)
   bij Telerik.Windows.Automation.Peers.RadMaskedInputBaseAutomationPeer.GetItemStatusCore()
   bij System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   bij System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   bij System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   bij System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   bij System.Windows.ContextLayoutManager.fireAutomationEvents()
   bij System.Windows.ContextLayoutManager.UpdateLayout()
   bij System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   bij System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   bij System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   bij System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   bij System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   bij System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bij MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

When performing remote debugging sessions, we could not find the reason for this problem.

Is this a bug or did we make a mistake ?

Kind regards,
Mike Overmeijer

6 Answers, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 07 Aug 2014, 08:43 AM
Hi Mike,

We are aware of this issue in our AutomationXmlSerializer. The good news is that it is already resolved in Q2 2014. Is it possible for you to upgrade to Q2 2014 and let us know if everything works correctly ?

Regards,
Petar Mladenov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Mike
Top achievements
Rank 1
answered on 12 Aug 2014, 02:03 PM
Hi Petar,

I upgrade to the project with the Q2 2014 release. I'm not able to tell you right now whether it fixes the issue, as another issue appeared after the upgrade. The issue is about the height of the RadBusyIndicator. According to the XAML of the Window, the busy indicator contains a grid. But when we check the WPF visualizer, the busy indicator does not contain any content.

The XAML:

<Window x:Class="com.ideo.mqm.MQM_Win32.View.FormLogin"
        xmlns:lex="http://wpflocalizeextension.codeplex.com"
        xmlns:v="clr-namespace:com.ideo.mqm.MQM_Win32.View"
        xmlns:viewHelper="clr-namespace:com.ideo.mqm.MQM_Win32.View.Helper"
        Title="MQM"
        ResizeMode="NoResize"
        SizeToContent="WidthAndHeight"
        WindowStartupLocation="CenterScreen"
        WindowStyle="None"
        BorderThickness="1"
        BorderBrush="CadetBlue"
        VerticalAlignment="Top"
        Loaded="Window_Loaded">
    <Window.Resources>
        <telerik:BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
    </Window.Resources>
    <ScrollViewer VerticalScrollBarVisibility="Auto"
                  PanningMode="VerticalOnly"
                  CanContentScroll="False"
                  PanningDeceleration="1000"
                  PanningRatio="2">
        <Grid VerticalAlignment="Top"
              HorizontalAlignment="Left">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="10" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Image x:Name="image"
                   Source="../images/productBig.JPG"
                   HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Width="600" />
            <Grid Grid.Row="2"
                  Margin="10,0,10,0"
                  VerticalAlignment="Top">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="10" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <v:UCMainTitleBar Title="{lex:LocText Key=LOGIN_TITLE, Dict=Resources, Assembly=MQM_Win32Resources}" />
 
                <Grid x:Name="gridLogin"
                      Grid.Row="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <telerik:RadBusyIndicator Grid.Row="0"
                                              BusyContent="{Binding Path=BusyMessage, Mode=OneWay}"
                                              IsBusy="{Binding Path=IsBusyIndicatorVisible, Mode=OneWay}"
                                              IsEnabled="{Binding Path=IsBusyIndicatorEnabled, Mode=OneWay}"
                                              IsIndeterminate="{Binding Path=IsBusyIndicatorIndeterminate, Mode=OneWay}"
                                              ProgressValue="{Binding Path=BusyIndicatorProgressValue, Mode=OneWay}"
                                              TabIndex="-1">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.25*" />
                                <ColumnDefinition Width="300" />
                                <ColumnDefinition Width="0.25*" />
                            </Grid.ColumnDefinitions>
                            <Label Grid.Row="0"
                                   Grid.Column="0"
                                   Content="{lex:LocText Key=LOGIN_USERNAME, Dict=Resources, Assembly=MQM_Win32Resources}" />
 
                            <telerik:RadMaskedTextInput x:Name="tbUsername"
                                                        AcceptsReturn="False"
                                                        Grid.Row="0"
                                                        Grid.Column="1"
                                                        IsClearButtonVisible="False"
                                                        Margin="5,5,5,5"
                                                        Width="250"
                                                        Mask=""
                                                        Placeholder=""
                                                        EmptyContent="{lex:LocText Key=LOGIN_USERNAME_EMPTY, Dict=Resources, Assembly=MQM_Win32Resources}"
                                                        VerticalAlignment="Bottom"
                                                        HorizontalAlignment="Center"
                                                        TabIndex="1"
                                                        SectionsNavigationMode="None"
                                                        Text="{Binding Path=Username, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                        TextMode="PlainText" />
                            <Label Grid.Row="1"
                                   Grid.Column="0"
                                   Content="{lex:LocText Key=LOGIN_PASSWORD, Dict=Resources, Assembly=MQM_Win32Resources}" />
                            <PasswordBox x:Name="tbPassword"
                                         GotFocus="PasswordBoxGotFocus"
                                         Grid.Row="1"
                                         Grid.Column="1"
                                         HorizontalAlignment="Center"
                                         Margin="5"
                                         HorizontalContentAlignment="Left"
                                         VerticalContentAlignment="Center"
                                         TabIndex="2"
                                         viewHelper:PasswordBoxAssistant.BindPassword="true"
                                         viewHelper:PasswordBoxAssistant.BoundPassword="{Binding Path=Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                         Width="250" />
                        </Grid>
                    </telerik:RadBusyIndicator>
 
                    <Grid Grid.Row="1">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto"
                                           MinHeight="22" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.25*" />
                            <ColumnDefinition Width="300" />
                            <ColumnDefinition Width="0.25*" />
                        </Grid.ColumnDefinitions>
 
                        <TextBlock Grid.Column="1"
                                   Grid.Row="0"
                                   Foreground="Red"
                                   HorizontalAlignment="Center"
                                   Margin="0,5,0,5"
                                   Text="{Binding Path=Message, Mode=OneWay}"
                                   Visibility="{Binding MessageVisible, Mode=OneWay}" />
                        <StackPanel Orientation="Horizontal"
                                    Grid.Row="1"
                                    Grid.Column="1"
                                    HorizontalAlignment="Center"
                                    Margin="0,10">
                            <telerik:RadSplitButton x:Name="btnLogin"
                                                    Content="{Binding Path=SelectedAction.Name, Mode=TwoWay}"
                                                    Click="BtnLoginClick"
                                                    MinWidth="80"
                                                    HorizontalAlignment="Right"
                                                    TabIndex="9"
                                                    DropDownIndicatorVisibility="{Binding Path=IsSubscribed, Mode=OneWay, Converter={StaticResource booleanToVisibilityConverter}}"
                                                    IsEnabled="{Binding Path=LoginButtonEnabled, Mode=OneWay}">
 
                                <telerik:RadSplitButton.DropDownContent>
                                    <ListBox BorderThickness="1"
                                             ItemsSource="{Binding Path=LoginActionList, Mode=OneTime}"
                                             SelectionChanged="SelectedActionChanged"
                                             DisplayMemberPath="Name"
                                             SelectedValuePath="Code">
                                        <ListBox.ItemsPanel>
                                            <ItemsPanelTemplate>
                                                <telerik:RadWrapPanel Width="180"
                                                                      Orientation="Vertical"
                                                                      IsAnimated="True" />
                                            </ItemsPanelTemplate>
                                        </ListBox.ItemsPanel>
                                    </ListBox>
                                </telerik:RadSplitButton.DropDownContent>
                            </telerik:RadSplitButton>
                            <telerik:RadButton Name="btnExit"
                                               Click="ButtonExitClick"
                                               Width="80"
                                               HorizontalAlignment="Right"
                                               TabIndex="10"
                                               Content="{lex:LocText Key=LOGIN_EXIT, Dict=Resources, Assembly=MQM_Win32Resources}"
                                               Margin="10,0,0,0" />
                        </StackPanel>
                    </Grid>
                </Grid>
            </Grid>
        </Grid>
    </ScrollViewer>
</Window>

Is this another bug?

Kind regards,
Mike
0
Kalin
Telerik team
answered on 14 Aug 2014, 08:55 AM
Hello Mike,

We are not aware of such an issue with the BusyIndicator. However I tested the explained scenario and was able to see the content of the BusyIndicator in the WPF visualizer. However the issue might be that you are checking it before it has loaded its content. Please try the same in the Loaded event handler of the BusyIndicator.

Hope this helps.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Mike
Top achievements
Rank 1
answered on 19 Aug 2014, 08:31 AM
Hi Kalin,

Also in the RadBusyIndicator Loaded event, the busy indicator does not see the grid as it's content, even though it is actually placed as content for the indicator.

Kind regards,
Mike Overmeijer
0
Mike
Top achievements
Rank 1
answered on 19 Aug 2014, 09:17 AM
Hey Kalin,

For testing purposes I removed the RadBusyIndicator; when starting the application then, the grid with its controls (the grid which was the content of the busy indicator) are shown properly. If I put the busy indicator back with the grid as it's content, the grid is not shown anymore.

Kind regards,
Mike
0
Accepted
Kalin
Telerik team
answered on 20 Aug 2014, 12:42 PM
Hello Mike,

I tried using the same elements you have inside of the BusyIndicator in the provided sample code, but couldn't reproduce the described issue. I'm attaching a video of my test. What I can suggest you would be try to remove as many elements as possible from the same Window (BusyIndicator bound properties as well) until you have a few element and still be able to reproduce the issue. The you can provide us with the code and sample steps if needed, so we can reproduce it on our side and give you a possible solution of the problem.

I'm looking forward to hearing from you.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Mike
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Mike
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or