PowerShell/src/Microsoft.Management.UI.Internal/ShowCommand/Controls/ImageButton/ImageToggleButton.xaml
2020-01-11 12:15:34 +05:00

30 lines
1.7 KiB
XML

<!--=================================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
==================================================================-->
<controls:ImageButtonBase x:Class="Microsoft.PowerShell.Commands.ShowCommandInternal.ImageToggleButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Microsoft.PowerShell.Commands.ShowCommandInternal">
<Grid HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Microsoft.PowerShell.GraphicalHost;component/showcommand/controls/imagebutton/imagebuttoncommon.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Grid.Resources>
<Grid>
<ToggleButton
x:Name="toggleInnerButton"
Command="{Binding Path=Command, RelativeSource={RelativeSource AncestorType={x:Type controls:ImageButtonBase}}}"
IsChecked="{Binding Path=IsChecked, RelativeSource={RelativeSource AncestorType={x:Type controls:ImageButtonBase}}}"
ToolTip="{Binding Converter={StaticResource imageButtonToolTipConverter}, RelativeSource={RelativeSource AncestorType={x:Type controls:ImageButtonBase}}}"
ToolTipService.ShowOnDisabled="True" Style="{StaticResource imageButtonStyle}">
</ToggleButton>
</Grid>
</Grid>
</controls:ImageButtonBase>