Reputation: 303
Im trying to use thumbs in Avalonia. Currently I have a UserControl for testing purposes with the following code inside:
<Canvas Width="200" Height="200" Background="Lime">
<!-- Corner Resize Handles -->
<Thumb Name="TopLeftThumb" Background="Red" Width="10" Height="10" Canvas.Left="0" Canvas.Top="0" Cursor="TopLeftCorner" />
<Thumb Name="TopRightThumb" Background="Red" Width="10" Height="10" Canvas.Left="190" Canvas.Top="0" Cursor="TopRightCorner" />
<Thumb Name="BottomLeftThumb" Background="Red" Width="10" Height="10" Canvas.Left="0" Canvas.Top="190" Cursor="BottomLeftCorner" />
<Thumb Name="BottomRightThumb" Background="Red" Width="10" Height="10" Canvas.Left="190" Canvas.Top="190" Cursor="BottomRightCorner" />
<!-- Edge Resize Handles -->
<Thumb Name="TopThumb" Background="Red" Height="10" Canvas.Left="10" Canvas.Top="0" Width="180" Cursor="TopSide" />
<Thumb Name="BottomThumb" Background="Red" Height="10" Canvas.Left="10" Canvas.Top="190" Width="180" Cursor="BottomSide" />
<Thumb Name="LeftThumb" Background="Red" Width="10" Canvas.Left="0" Canvas.Top="10" Height="180" Cursor="LeftSide" />
<Thumb Name="RightThumb" Background="Red" Width="10" Canvas.Left="190" Canvas.Top="10" Height="180" Cursor="RightSide" />
</Canvas>
But they don't show up. It just results in a Lime Canvas without any sign of the thumbs (also not on hover):
Why is this? I also couldn't find a good example of how to use thumbs.
Upvotes: 1
Views: 35