I actually struggle to find a way to make a Image clickable or generate a Image Button in XAMl. There is even no Documentation on how to generate a Simple Image Button.
Tried to find Image Button. Tried to Use Button. Tried to Use Image. Tried to Use Image Icon. Image Button does not Exist. Button has no obvious way to put an Image on it. Image doesn't feature a click handler. Image Icon doesn't feature a click handler as well.
Even searching through google didn't bring any Idea, it looks like I'm the only Person who want to have an Image clickable. That's quite strange.
Does anybody has an Idea?
Thanks a lot in advance!
Best regards Eschmo
Update:
<Grid x:Name="FeatureBar" >
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="FeatureBarLeftPaddingColumn" Width="10"/>
<ColumnDefinition x:Name="LogFileAnalysis"/>
<ColumnDefinition x:Name="FeatureBarRightPaddingColumn" Width="10"/>
</Grid.ColumnDefinitions>
<Image x:Name="LogAnalyzerIcon" Grid.Column="1" Source="/Assets/logfileAnalyzerIcon.png" Width="50" Height="50" VerticalAlignment="Center" HorizontalAlignment="Left"/>
<Button x:Name="Test" Width="50" Height="50" Grid.Column="1" />
</Grid>
Buttonderives fromContentControland inherits itsContentproperty that you can set.<Button ...><Image Source="/Assets/logfileAnalyzerIcon.png" ... /></Button>. Assuming this is using WinUI 3 you can install the WinUI 3 Gallery. This helps you navigate the different controls and learn how to use and customize them. You'll find the "image button" under "Basic input" -> "Button".