minor fixes for dialog & imagebutton
This commit is contained in:
@@ -9,17 +9,20 @@
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Spacing="6"
|
||||
>
|
||||
>
|
||||
|
||||
<Image
|
||||
x:Name="ButtonImage"
|
||||
Margin="0, 0, 0, 6"
|
||||
VerticalAlignment="Center"
|
||||
Width="16"
|
||||
Height="16"
|
||||
x:Name="ButtonImage"
|
||||
/>
|
||||
IsVisible="False"
|
||||
/>
|
||||
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
x:Name="ButtonText"
|
||||
/>
|
||||
VerticalAlignment="Center"
|
||||
/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
@@ -22,7 +22,11 @@ public partial class ImageButton : Button
|
||||
public IImage? ImageSource
|
||||
{
|
||||
get => ButtonImage.Source;
|
||||
set => ButtonImage.Source = value;
|
||||
set
|
||||
{
|
||||
ButtonImage.Source = value;
|
||||
ButtonImage.IsVisible = value != null;
|
||||
}
|
||||
}
|
||||
|
||||
public double ImageWidth
|
||||
|
||||
@@ -9,17 +9,20 @@
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Spacing="6"
|
||||
>
|
||||
>
|
||||
|
||||
<Image
|
||||
x:Name="ButtonImage"
|
||||
Margin="0, 0, 0, 6"
|
||||
VerticalAlignment="Center"
|
||||
Width="16"
|
||||
Height="16"
|
||||
x:Name="ButtonImage"
|
||||
/>
|
||||
IsVisible="False"
|
||||
/>
|
||||
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
x:Name="ButtonText"
|
||||
/>
|
||||
VerticalAlignment="Center"
|
||||
/>
|
||||
</StackPanel>
|
||||
</SplitButton>
|
||||
|
||||
@@ -22,7 +22,11 @@ public partial class ImageSplitButton : SplitButton
|
||||
public IImage? ImageSource
|
||||
{
|
||||
get => ButtonImage.Source;
|
||||
set => ButtonImage.Source = value;
|
||||
set
|
||||
{
|
||||
ButtonImage.Source = value;
|
||||
ButtonImage.IsVisible = value != null;
|
||||
}
|
||||
}
|
||||
|
||||
public double ImageWidth
|
||||
|
||||
Reference in New Issue
Block a user