Reputation: 13
I need to display a text "welcome" on the right-bottom corner of a canvas with red colour
this is my xaml code
<Canvas x:Name="imageOne" Background="White" Width="480" Height="800" >
</Canvas>
please help me
Upvotes: 1
Views: 257
Reputation: 1843
Canvas defines an area within which you have to explicitly position TextBlock element by coordinates relative to the Canvas area. Means you have to do absolute positioning inside a Canvas.
If you really want to use a Canvas, you can better take a transparent Grid inside it and put a TextBlock inside that Grid.
Example:
<Canvas x:Name="imageOne" Background="White" Width="480" Height="800">
<Grid Width="480" Height="800">
<TextBlock Text="Visifire" VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
</Grid>
</Canvas>
Please make sure that the Grid size is same as Canvas size.
Upvotes: 1