Materialdesigninxamltoolkit: Help with textbox

Created on 8 Sep 2016  路  10Comments  路  Source: MaterialDesignInXAML/MaterialDesignInXamlToolkit

Hi, i have problem with textbox hint.

When font is small everythink is ok, but when i use largest font the hint in on my text. i tried use code from demo
`ialDesign:HintAssist.IsFloating="True"
materialDesign:HintAssist.Hint="Large Font"

             materialDesign:HintAssist.FloatingScale="0.50"                 
             Text="Some Text"

             FontSize="24"/>`

But it's still the same.

up-for-grabs

All 10 comments

Which version are you using? Latest pre release?

Yes

Please post a sample repo.

` xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:local="clr-namespace:Test"
mc:Ignorable="d"
Title="Login page" Height="1220" Width="900" WindowState="Maximized" Background="#FFE8C215">

<materialDesign:DialogHost Identifier="RootDialog">
    <ScrollViewer VerticalScrollBarVisibility="Auto" Background="White">
        <Grid>
            ...
                <TextBox x:Name="loginText" materialDesign:HintAssist.FloatingScale="1" Style="{StaticResource MaterialDesignFloatingHintTextBox}" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" Margin="0,350,0,0" materialDesign:HintAssist.IsFloating="True" HorizontalAlignment="Center" VerticalAlignment="Top" Width="400" FontSize="36" Height="100" Background="White" Padding="6,0,0,2">
                    <materialDesign:HintAssist.Hint>
                        <StackPanel Orientation="Horizontal" Margin="0 0 0 0">
                            <materialDesign:PackIcon Kind="Account" Width="50" Height="50" />
                            <TextBlock Padding="5,0,0,0">Enter login</TextBlock>
                        </StackPanel>
                    </materialDesign:HintAssist.Hint>
                </TextBox>
        </Grid>
    </ScrollViewer>
</materialDesign:DialogHost>

/Controls:MetroWindow`

Try tweaking FloatingOffset:

materialDesign:HintAssist.FloatingScale=".56" 
materialDesign:HintAssist.FloatingOffset="1,-42"

image

Just amazing! Thx You so much :)

Ok one more question haha :) The same issue but with passwordbox

Might need to update the style...

Hello, how can I change the border color of the text box when it receives the focus ... the purple color that brings by default

Why doesn't clear button in the textbox doesn't bring focus back to the textbox after clearing the contents?

Was this page helpful?
0 / 5 - 0 ratings