WPF实现窗体中的悬浮按钮

2020-01-05 09:55:43王振洲

如何使用:


<Window
    xmlns="http://www.easck.com/winfx/2006/xaml/presentation"
    xmlns:x="http://www.easck.com/winfx/2006/xaml"
    xmlns:ui="clr-namespace:SunCreate.Common.Controls;assembly=SunCreate.Common.Controls"
    xmlns:d="http://www.easck.com/expression/blend/2008" xmlns:mc="http://www.easck.com/markup-compatibility/2006" mc:Ignorable="d" x:Class="SunCreate.Common.Controls.Demo.MainWindow"
    Height="700" Width="1200" 
    Background="#ff10498c" 
    WindowStartupLocation="CenterScreen">
  <Grid>
    <ui:FloatButton x:Name="floatBtn" ></ui:FloatButton>
  </Grid>
</Window>

效果图:

WPF,窗体,悬浮按钮

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持ASPKU。


注:相关教程知识阅读请移步到c#教程频道。