Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Image/watermark disappear in WatermarkTextBox

$
0
0
My code looks like this:
<!-- Username -->
            <extToolkit:WatermarkTextBox Margin="0,0,0,10" Text="{Binding Username}" >
                <extToolkit:WatermarkTextBox.Watermark>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="pack://application:,,,/SpotOnParty.Infrastructure;component/Images/User16.png" Height="16" Width="16" Stretch="Fill" />
                        <TextBlock x:Name="tbUsername" Margin="4,0,0,0" Text="Username" />
                    </StackPanel>
                </extToolkit:WatermarkTextBox.Watermark>
            </extToolkit:WatermarkTextBox>
Q1. I see the image/watermark perfectly in design time but when i run the application it doesn't show the image. Only the watermark. What is wrong?

Q2. Another thing is that I want the image to be shown at all time, even when the text is set. Is that possible

Q3. Will it be possible to show show the watermark when the control have focus, until the first character is wirtten?

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>