<code class="lang-xml"><window x:class="wpfround.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:wpfround" mc:ignorable="d" title="MainWindow" height="300" width="400" windowstyle="None" allowstransparency="True" mouseleftbuttondown="Window_MouseLeftButtonDown" background="Transparent"> <border borderbrush="#ff00ffff" borderthickness="2" cornerradius="0, 20, 30, 40" background="#eeffffff"> <grid x:name="rootgrid"> <textbox x:name="textBox" horizontalalignment="Left" height="23" margin="79,72,0,0" textwrapping="Wrap" text="这里是文本框" verticalalignment="Top" width="203"> <button x:name="btnOK" content="确定" horizontalalignment="Left" margin="148,234,0,0" verticalalignment="Top" width="75" click="btnOK_Click"> </button><button x:name="btnCancel" content="取消" horizontalalignment="Left" margin="259,234,0,0" verticalalignment="Top" width="75" click="btnCancel_Click"> </button></textbox></grid> </border> </window></code>
<code class="lang-c">using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Forms.Integration; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace wpfround { /// <summary> /// MainWindow.xaml 的交互逻辑 /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { this.DragMove(); // 实现拖动 } private void btnOK_Click(object sender, RoutedEventArgs e) { try { this.DialogResult = true; } catch (Exception) { this.Close(); } } private void btnCancel_Click(object sender, RoutedEventArgs e) { try { this.DialogResult = false; } catch (Exception) { this.Close(); } } } }</code>
[修改于 8年7个月前 - 2016/05/31 19:27:49]
时段 | 个数 |
---|---|
{{f.startingTime}}点 - {{f.endTime}}点 | {{f.fileCount}} |