Question

I'm trying to make a Button always stay on top even after minimize the application. Quite like a floating Button, when I click the Button the application hide, click it again the application show.

Window can set the Topmost="True" property, what about the Button?

Was it helpful?

Solution

You should make more one window with button, like this in XAML:

<Window AllowTransparency="True" ResizeMode="NoResize" WindowStyle="None"
        Topmost="True" ShowInTaskbar="False" SizeToContent="WidthAndHeight"
        Background="{x:Null}">
    <Button x:Name="HideShowButton" Content="Restore" />
</Window>

Button cannot exist without window, but with these properies window will be invisible.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top