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

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

Silverlight Slider 控件 莫名奇妙 報(bào)錯(cuò)

Silverlight Slider 控件 莫名奇妙 報(bào)錯(cuò)

慕田峪7331174 2018-12-06 18:06:55
當(dāng)在xaml文件中設(shè)置Value值之后,編譯解決方案后 預(yù)覽時(shí)會(huì)報(bào)錯(cuò)!~~具體代碼如下:Page.xaml  1<UserControl x:Class="SliderMaxValueTest.Page" 2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  4    Width="400" Height="300"> 5    <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True"> 6        <Grid.RowDefinitions> 7            <RowDefinition Height="150" /> 8            <RowDefinition Height="*" />        9        </Grid.RowDefinitions>10        <Slider Maximum="255" Minimum="0" Value="100.0" Grid.Row="0" x:Name="sld" Orientation="Vertical" MaxHeight="300" ValueChanged="Slider_ValueChanged"/>11        <TextBlock x:Name="Val" Grid.Row="1" Width="200" />12    </Grid>13</UserControl>   Page.xaml.cs  1namespace SliderMaxValueTest 2{ 3    public partial class Page : UserControl 4    { 5        public Page() 6        { 7            InitializeComponent(); 8        } 910        private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)11        {12            Val.Text = e.NewValue.ToString();13        }14    }15}   預(yù)覽測試網(wǎng)頁文件時(shí)報(bào)錯(cuò):Microsoft JScript runtime error: Unhandled Error in Silverlight 2 Application AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 10 Position: 157]   at System.Windows.Application.LoadComponent(Object component, Uri xamlUri)   at SliderMaxValueTest.Page.InitializeComponent()   at SliderMaxValueTest.Page..ctor()   at SliderMaxValueTest.App.Application_Startup(Object sender, StartupEventArgs e)   at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)如果不設(shè)置 Slider 控件的Value值時(shí),就很正常!很是納悶,哪位朋友幫我看下錯(cuò)哪了?難道是Silverlight版本問題?
查看完整描述

1 回答

?
狐的傳說

TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超3個(gè)贊

在Silverlight 2 Beta 2中,如果定義了ValueChanged,似乎不能給Slider的value屬性在Xaml中賦初值,可能是一個(gè)Bug。 你可以在Page的構(gòu)造函數(shù)中: public Page() { InitializeComponent(); this.sld.Value = 100; } 或者在Page_Loaded事件中賦初值: void Page_Loaded(object sender, RoutedEventArgs e) { this.sld.Value = 100; }
查看完整回答
反對(duì) 回復(fù) 2019-01-21
  • 1 回答
  • 0 關(guān)注
  • 452 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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