我正在尝试在 windows 通用 8.1 上放置一个滑块,但我不确定需要什么。我的错误是:
Exception thrown: 'Windows.UI.Xaml.Markup.XamlParseException' in Mead Must Maker.Windows.exe
WinRT information: Failed to assign to property 'Windows.UI.Xaml.Controls.Primitives.RangeBase.Minimum'. [Line: 22 Position: 182]
The program '[1260] Mead Must Maker.Windows.exe' has exited with code -1073741189 (0xc000027b).
这段代码到底出了什么问题?这是第 22 行:
<Slider x:Name="volumeSlider" HorizontalAlignment="Left" Height="50" Margin="50,400,0,0" VerticalAlignment="Top" Width="550" Maximum="10" LargeChange="1" Minimum="1" SmallChange="0.5" StepFrequency="0.5" TickFrequency="1" TickPlacement="Outside" Value="5" FontFamily="Global User Interface" ValueChanged="volumeSlider_ValueChanged"/>
这是事件处理程序:
private void volumeSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
{
volume = float.Parse(volumeSlider.Value.ToString());
volumeTextBox.Text = volume.ToString();
Calculate();
}