צפיות
תשובות
למה זה לא עובד לי?
שלום רב!
ראשית , אני רוצה להודות לאריק על המדריך המצויין. קשה למצוא חומרים באינטרנט על WPF, ולכן המדריך הזה מועיל מאוד.
כעת לעצם השאלה: כתבתי את הקוד המופיע במאמר, אך הVS מתעקש שיש בו טעויות. מה הבעיה בקוד?
צירפתי העתקים של הקובץ XAML, וקובץ הcs
<Window x_Class="FirstWpfApplication2.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>
<Label Content="Hello XAML" />
<Button x:Name = "myButton"
Content="Hello WPF World"
Width="100"
Height="40" />
</Grid>
</Window>
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;
namespace WpfApplication2
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
myButton.FontSize = 16;
}
}
}
0 תשובות