Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalized watermark #89

Open
bent-rasmussen opened this issue Dec 16, 2021 · 2 comments
Open

Generalized watermark #89

bent-rasmussen opened this issue Dec 16, 2021 · 2 comments

Comments

@bent-rasmussen
Copy link

Improvement suggestion:

The watermark adorner looks great, however it seems like there is a limitation in terms of what it can display. I have a use-case where I want to show a magnifier glass symbol before the text "Search". In order to display the magnifier glass I need to be able to set the font family to Segoe MDL2 Assets. This does not appear possible in the current implementation. Do you like the idea of having a TextBlock property type here?

Here's how I do it with the current buggy watermark implementation I use:

<TextBox Text="{Binding Path=Foo}">
    <uc:WatermarkService.Watermark>
        <TextBlock>
            <Run FontFamily="Segoe MDL2 Assets" Text="&#xE721;" />
            <TextBlock Text="Search">
                <TextBlock.RenderTransform>
                    <TranslateTransform Y="-1" />
               </TextBlock.RenderTransform>
            </TextBlock>
       </TextBlock>
   </uc:WatermarkService.Watermark>
</TextBox>
@JohanLarsson
Copy link
Member

Maybe the overlay is a fit for this use case?

@bent-rasmussen
Copy link
Author

Maybe, it just sounded like watermark was the correct adorner because it can hide the text when the user enters text into the textbox - but I will take a look at that - or experiment with customizing the watermark adorner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants