0

I am developing an on-screen keyboard where each key generates a sequence of three keystrokes to another application. Each button has a text description. But now clients want the function to be able to choose to see which characters are sent. Then I want the chars to be displayed over the descriptive text so that it is still possible to imagine the text below, see my suggestion below. But how do I do that?

suggestion

magol
  • 6,135
  • 17
  • 65
  • 120

2 Answers2

1

Place 2 TextBox or TextBlock one on top of the other, and make the background of the top one transparent.

msarchet
  • 15,104
  • 2
  • 43
  • 66
  • Yes, so far I've managed to come. But then you can not read the text. What I asking for is how I create a shadow – magol Mar 15 '11 at 14:24
  • it seems i was too slow^^ you can create a shadow effect with some radialgradientbrush. see my anwser below – blindmeis Mar 15 '11 at 14:26
1

one simple solution is to put 2 textblocks in a grid and make the background of the top one transparent.

 <Grid Background="White" Width="100" Height="100">

                  <TextBlock Text="sdjfkjkf jskljfkl s flksjlkfjslkfjsdlkfjlök fjösljfslkdöfjklsdjfls" TextWrapping="Wrap" 
                       HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
            <TextBlock Padding="10,3" Text="ABc"  FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center">
                <TextBlock.Background>
                    <RadialGradientBrush>
                        <GradientStop Color="#00EFEEEE" Offset="1"/>
                        <GradientStop Color="#B2EDC4C4" Offset="0.836"/>
                    </RadialGradientBrush>
                </TextBlock.Background>
            </TextBlock>        

        </Grid>

enter image description here

blindmeis
  • 22,175
  • 7
  • 55
  • 74