Getting the value of an inputBox with ignoreStyle="true"

Hi,

i have a class defined for my inputboxes:

<TextInput ux:Class="inputBox" IgnoreStyle="true" ClipToBounds="false" Margin="0,0,10,0" Padding="20,7,20,7" Alignment="VerticalCenter">
    <TextEdit FontSize="14"/>
    <Rectangle Layer="Background" CornerRadius="10">
        <Stroke Width="1" Brush="#7d7d7d"/>
    </Rectangle>
</TextInput>

that i use somewhere else:

<inputBox TextColor="#000f" Value="{myInputBoxValue}">

the problem i have is that as long as i define the class with IgnoreStyle=“true” i cannot access the value of the inputBox (i always get “”) and the same happens if i want to use the “ValueChanged”

What am i missing in the class to be able to get the value of my inputBox ??

Thnx

Hi!

You shouldn’t put a TextEdit inside a TextInput. The TextInput itself will do.

<TextInput ux:Class="InputBox" IgnoreStyle="true" ClipToBounds="false" Margin="0,0,10,0" Padding="20,7,20,7" Alignment="VerticalCenter" FontSize="14">
    <Rectangle Layer="Background" CornerRadius="10">
        <Stroke Width="1" Brush="#7d7d7d"/>
    </Rectangle>
</TextInput>

Also, the Fuse convention is to use upper-case first letter for class names.

Please let me know if this works for you.

Hi,

i copy+pasted from an old file i didn’t even notice that i was using textInput instead of textEdit

that worked for me:

<TextEdit ux:Class="inputBox" ClipToBounds="false" Margin="0,0,10,0" Padding="20,7,20,7" Alignment="VerticalCenter" TextAlignment="Left" FontSize="14" > 
    <Rectangle Layer="Background" CornerRadius="10">
        <Stroke Width="1" Brush="#7d7d7d"/>
    </Rectangle>
</TextEdit>

i am using lower case firt letter as then it’s easier to recognise wich class are custom.