Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top