UXCallOut Focus on first control

1 reply. Last post: March 10, 2011 10:37 PM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Ross SantosMember

Hello all,

I'm trying to get focus on the first field in a UXCallOut and can't seem to get it to work in MVVM.  Here's the xaml snippet:


            <Intersoft:UXCallOut x:Name="coWeighHS" DisableOverlay="False" PreferredPosition="Right" IsOpen="{Binding IsWeighHSCalloutOpen, Mode=TwoWay}" VerticalAlignment="Center">

                <Intersoft:UXCallOut.Header>

                    <Intersoft:UXButton Content="Weigh" HorizontalAlignment="Center" Margin="4" Command="{Binding WeighHSCommand}"

                        Width="100" Background="#3FD7D7D7" GlassBackground="{x:Null}" Foreground="White" DisplayMode="ContentAndImage" Icon="/TourneyJett;component/Assets/Images/Dock/weighin.png" ImageHeight="20" ImageWidth="20">

                        <Intersoft:UXButton.ContentEffect>

                            <DropShadowEffect ShadowDepth="1"/>

                        </Intersoft:UXButton.ContentEffect>

                    </Intersoft:UXButton>

                </Intersoft:UXCallOut.Header>

                <StackPanel>

                    <StackPanel Orientation="Horizontal">

                        <Intersoft:FieldLabel x:Name="flCountHS" Header="Count:" HeaderPosition="Top" HeaderForeground="White" >

                            <Intersoft:UXNumericUpDown x:Name="nudCountHS" Width="40" Minimum="0" Maximum="5" Value="{Binding CurrentEventResultHS.ResultCount, Mode=TwoWay, NotifyOnValidationError=True}" DisplayMask="0" EditMask="0" VerticalAlignment="Center" Margin="2" />

                        </Intersoft:FieldLabel>

                        <Intersoft:FieldLabel Header="Weight:" HeaderPosition="Top" HeaderForeground="White" >

                            <Intersoft:UXNumericUpDown Width="80" Minimum="0" Maximum="40" Value="{Binding CurrentEventResultHS.ResultValue, Mode=TwoWay, NotifyOnValidationError=True}" DisplayMask="#0.####" EditMask="#0.####" VerticalAlignment="Center" Margin="2"/>

                        </Intersoft:FieldLabel>

                        <Intersoft:FieldLabel Header="Penalty:" HeaderPosition="Top" HeaderForeground="White" >

                            <Intersoft:UXNumericUpDown Width="80" Minimum="0" Maximum="40" Value="{Binding CurrentEventResultHS.ResultPenalty, Mode=TwoWay, NotifyOnValidationError=True}" DisplayMask="#0.####" EditMask="#0.####" VerticalAlignment="Center" Margin="2"/>

                        </Intersoft:FieldLabel>

                    </StackPanel>

                    <StackPanel Orientation="Horizontal" >

                        <Intersoft:UXCheckBox Content="Disqualified" Margin="2" VerticalAlignment="Center" IsChecked="{Binding CurrentEventResultHS.IsDQ, Mode=TwoWay}" Foreground="White" />

                        <Intersoft:UXCheckBox Content="No Show" Margin="2" VerticalAlignment="Center" IsChecked="{Binding CurrentEventResultHS.IsNoShow, Mode=TwoWay}" Foreground="White" />

                    </StackPanel>

                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,6,0,0">

                        <Intersoft:UXButton Content="OK" Command="{Binding WeighHSOKCommand}" Width="90" Height="24" VerticalAlignment="Bottom" Background="#3FD7D7D7" GlassBackground="{x:Null}" Foreground="White" DisplayMode="ContentAndImage" Icon="/TourneyJett;component/Assets/Images/Dock/tj.png" ImageHeight="20" ImageWidth="20" HorizontalContentAlignment="Left" Margin="2">

                            <Intersoft:UXButton.ContentEffect>

                                <DropShadowEffect ShadowDepth="1" />

                            </Intersoft:UXButton.ContentEffect>

                        </Intersoft:UXButton>

                        <Intersoft:UXButton Content="Cancel" Command="{Binding WeighHSCancelCommand}" Width="90" Height="24" VerticalAlignment="Bottom" Background="#3FD7D7D7" GlassBackground="{x:Null}" Foreground="White" DisplayMode="ContentAndImage" Icon="/TourneyJett;component/Assets/Images/Dock/tj.png" ImageHeight="20" ImageWidth="20" HorizontalContentAlignment="Left" Margin="2">

                            <Intersoft:UXButton.ContentEffect>

                                <DropShadowEffect ShadowDepth="1" />

                            </Intersoft:UXButton.ContentEffect>

                        </Intersoft:UXButton>

                    </StackPanel>

                </StackPanel>

            </Intersoft:UXCallOut>


When the IsWeighHSCalloutOpen is true in my MVVM property, I use:

ISFocusManager.SetFocus("nudCountHS");

However, it never gains focus until I click on a control in the UXCallOut or on the UXCallOut itself.  Once a control has focus, I can tab around the controls as expected but tabbing without first clicking on the callout or a control in the callout ignore the existence of the callout and tabs to other fields in the view.

Any ideas?


Thanks,


Ross

All times are GMT -5. The time now is 6:02 AM.
Previous Next