English 中文(简体)
如何风格银灯商业应用的标志
原标题:How to style the Loginform of silverlight Business application

我正在使用SL4商业应用程序,利用世界家庭联合会的RIA服务。 在我看来,在标识符一的设计器中有一个标识,可以找到用户名文本箱和密码文本箱。 但是,在Xaml页中,它像下文所述法典一样。

 <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>

我的问题是,我需要把数据格式中的用户名文本框和密码文本箱打上风格。 我如何能够这样做? 从哪里可以做到这些控制?

最佳回答

这些控制由数据表格控制产生。 你基本上需要在根植的Grid s Resources下为文本Box和SapwordBox树立一个违约的风格。 我给了他们50人的大体字体。 你只是需要用你自己的风格来取代他们。

<!-- LoginDataForm Style -->
<Style x:Key="LoginDataFormStyle" TargetType="dataControls:DataForm">
    <Setter Property="Width" Value="370"/>
    <Setter Property="AutoCommit" Value="True"/>
    <Setter Property="AutoGenerateFields" Value="True"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="DescriptionViewerPosition" Value="Auto"/>
    <Setter Property="LabelPosition" Value="Auto"/>
    <Setter Property="HeaderVisibility" Value="Collapsed"/>
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Margin" Value="0,0"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="dataControls:DataForm">
                <Grid dataControls:DataField.IsFieldGroup="True">
                    <Grid.Resources>
                        <Style TargetType="TextBox">
                            <Setter Property="FontSize" Value="50"/>                    
                        </Style>
                        <Style TargetType="PasswordBox">
                            <Setter Property="FontSize" Value="50"/>                    
                        </Style>
                        <Style x:Key="ButtonGeneric" TargetType="Button">

希望:

问题回答

表格自动为您创造田地(AutoGenerate Fields property is set to True byail)。 但是,在银星商业应用模板中的LoginForm一案中,表格有一张手提器,可登录<代码>。 AutoGenerating Fields activity ( CarloinForm_AutoGenerating Field as reflected in You xaml). 在这一手稿中,创建了用户名文本箱和密码箱,输入数据并在表格中添加。 你可以在那里跳跃,通过确定自己的财产,实现你想要的定制。

希望:





相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Remotely authenticating client Windows user on demand

Suppose I am writing a server for a particular network protocol. If I know that the client is running on a Windows machine, is it possible for my server to authenticate the Windows user that owns the ...

Role/Permission based forms authorizing/authentication?

While looking into forms authorizing/authentication, I found that it is possible to do role based authorizing by adding an array of roles to a FormsAuthenticationTicket. That way I can write User....

热门标签