I am using SL4 Business application with WCF RIA service. In my app, there is a loginForm. in the designer of loginform I can found username textbox and password textbox.But in .Xaml page its like the code given below.
<local:BusyIndicator x:Name="busyIndicator" BusyContent="{Binding Path=Strings.BusyIndicatorLoggingIn, Source={StaticResource ApplicationResources}}"
IsBusy="{Binding IsLoggingIn}">
<StackPanel Orientation="Vertical">
<toolkit:DataForm x:Name="loginForm"
Padding="10,0,10,0"
CurrentItem="{Binding}"
IsEnabled="{Binding IsLoggingIn, Converter={StaticResource NotOperatorValueConverter}}"
AutoEdit="True" CommandButtonsVisibility="None" HeaderVisibility="Collapsed"
AutoGeneratingField="LoginForm_AutoGeneratingField"
Style="{StaticResource LoginDataFormStyle}" />
</StackPanel>
</local:BusyIndicator>
My question is I need to style the username textbox as well as password textbox in the dataform. How can I do this? From where can i access these controls?
Those controls are generated by the DataForm control. You basically need to put a default style for TextBox and PasswordBox under the root Grid’s Resources. I gave them a massive font size of 50. You just need to replace them with your own styles.
Hope this helps. 🙂