If you want to do something like ITool you basically need to roll your own. In ArcGIS Runtime you are building the user interface from scratch, not integrating into another user interface framework.
ITool is tricky because of the on/off behavior. In Runtime this is more complex because you then have be capturing MapView events or in this case using SketchEditor
We developed an approach that was more around doing an ICommand using an ItemsControl in Xaml which defines the DataTemplate of your button. Along these lines
<ItemsControl Margin="0, 0, 10, 0" x:Name="ToolbarCommands" HorizontalAlignment="Stretch" ItemsSource="{Binding ToolbarCommands}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"></StackPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Padding="10" Style="{DynamicResource ToolbarButtonStyle}" Command="{Binding Command}"
CommandParameter="{Binding}">
<Button.ToolTip>
<StackPanel Background="LightYellow" Width="180">
<Label Content="{Binding Name}" FontWeight="Bold" Margin="0 0 0 5"/>
<TextBlock Text="{Binding ToolTip}" TextWrapping="Wrap" />
</StackPanel>
</Button.ToolTip>
<Image>
<Image.Style>
<Style TargetType="{x:Type Image}">
<Setter Property="Source" Value="{Binding ImageUri}"/>
</Style>
</Image.Style>
</Image>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Then you can have your own tool interface (in this case IToolbarCommand)
namespace Mobile.Framework.UI
{
public interface IToolbarCommand
{
string Name { get; set; }
string ToolTip { get; set; }
int Order { get; set; }
Uri ImageUri { get; set; }
ICommand Command { get; set; }
}
}
Then the trick is to just come-up with the way to load these at runtime that fits your application architecture. Our approach was to use tools defined in Prism Modules which fired an event that was received in the main user interface bound view model.
Unfortunately for things that had an On./Off state never really defined as clean an approach. What we generally did was have a custom ToggleButton style that had pressed/unpressed look with a bound IsChecked property. The initial click would trigger an ICommand and when it was time to give control back any handlers were released and the IsChecked set back to false. SketchEditor is nice because it is awaitable so things can often be done in a single method.
Good luck
Thanks,
-Joe