第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

用c# progressBar 控件實(shí)現(xiàn)進(jìn)度條紅綠藍(lán)三種顏色漸變

用c# progressBar 控件實(shí)現(xiàn)進(jìn)度條紅綠藍(lán)三種顏色漸變

C#
柔情似水的眼眸3611166 2017-05-08 17:06:46
.cs源碼using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using System.Threading;namespace 進(jìn)度條顯示{? ? /// <summary>? ? /// MainWindow.xaml 的交互邏輯? ? /// </summary>? ? public partial class MainWindow : Window? ? {? ? ? ? public MainWindow()? ? ? ? {? ? ? ? ? ? InitializeComponent();? ? ? ? }? ? ? ? private delegate void A(System.Windows.DependencyProperty dp, object value);? ? ? ? private void process()? ? ? ? {? ? ? ? ? ? pro.Minimum = 0;? ? ? ? ? ? pro.Maximum = 10000;? ? ? ? ? ? pro.Value = 0;? ? ? ? ? ? double x = 0;? ? ? ? ? ? A update = new A(pro.SetValue);? ? ? ? ? ? do? ? ? ? ? ? {? ? ? ? ? ? ? ? x = x + 1;? ? ? ? ? ? ? ? Dispatcher.Invoke(update, System.Windows.Threading.DispatcherPriority.Background, new object[] { ProgressBar.ValueProperty, x });? ? ? ? ? ? ? ? lab.Content= (pro.Value * 100 / pro.Maximum).ToString()+"%";? ? ? ? ? ? ? ??? ? ? ? ? ? } while (pro.Value != pro.Maximum); ?? ? ? ? }? ? ? ? private void button1_Click(object sender, RoutedEventArgs e)? ? ? ? {? ? ? ? ? ? process();? ? ? ? ? ? pro.Foreground=? ? ? ? }? ? }}xaml源碼<Window x:Class="進(jìn)度條顯示.MainWindow"? ? ? ? xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"? ? ? ? xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"? ? ? ? Title="MainWindow" Height="350" Width="525">? ? <Grid>? ? ? ? <Button Content="start" Height="23" HorizontalAlignment="Left" Margin="175,160,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />? ? ? ? <Label Height="28" HorizontalAlignment="Left" Margin="441,81,0,0" Name="lab" VerticalAlignment="Top" />? ? ? ? <ProgressBar Height="30" HorizontalAlignment="Left" Margin="97,79,0,0" Name="pro" VerticalAlignment="Top" Width="313" />? ? </Grid></Window>
查看完整描述

目前暫無(wú)任何回答

  • 0 回答
  • 0 關(guān)注
  • 6436 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)