Программирование - это просто
Advertisement
arrow C# arrow Windows Presentation Foundation (WPF). arrow Windows Presentation Foundation (WPF). 2. XAML.
06.02.2023 .
1:
C#
Delphi
Web-
Excel-
.
Windows Presentation Foundation (WPF). 2. XAML. E-mail
megabax   
14.01.2013 .
http

Windows Presentation Foundation (WPF). 2. XAML.

XAML, .  :

  • XAML .NET, .
  • XML , XAML .
  • .

, XAML WPF-, WPF :

<Window x:Class="WpfApplication2.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>

       

    </Grid>

</Window>

  : - Windows. . MainWindows, WpfApplication2.

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>

    /// MainWindow.xaml

    /// </summary>

    public partial class MainWindow : Window

    {

        public MainWindow()

        {

            InitializeComponent();

        }

    }

}

Grid - , :

Windows Presentation Foundation (WPF).  2.   XAML.

, , :

Windows Presentation Foundation (WPF).  2.   XAML.

XAML :

<Window x:Class="WpfApplication2.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="Button" Height="23" HorizontalAlignment="Left" Margin="32,22,0,0" Name="button1" VerticalAlignment="Top" Width="75" />

    </Grid>

</Window>

, XAML :

  • Windows ( NavigationWindow, . ).
  • Page.
  • Application.

XAML .

, , . XAML xmlns, . , XAML .

http://schemas.microsoft.com/winfx/2006/xaml/presentation WPF. WPF, .

http://schemas.microsoft.com/winfx/2006/xaml XAML, , .

URL, , , . , , XAML . schemas.microsoft.com Microsoft, Microsoft . : XAML .NET, . XAML .NET.

XAML (Name):

<Window x:Class="WpfApplication1.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 Name="myGrid" Width="150"></Grid>

</Window>

C#, :

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 WpfApplication1

{

    /// <summary>

    /// MainWindow.xaml

    /// </summary>

    public partial class MainWindow : Window

    {

        public MainWindow()

        {

            InitializeComponent();

            MessageBox.Show(" : "+myGrid.Width.ToString());

        }

 

 

    }

}

Grid:

Windows Presentation Foundation (WPF).  2.   XAML.

:

Windows Presentation Foundation (WPF).  2.   XAML.

:

Windows Presentation Foundation (WPF).  2.   XAML.

:

        private void button1_Click(object sender, RoutedEventArgs e)

        {

            MessageBox.Show(" : " + myGrid.Width.ToString());

        }

:

Windows Presentation Foundation (WPF).  2.   XAML.

 

 

( 14.01.2013 . )
 
« .   . »
 
© 2023 Программирование - это просто
Joomla! - , GNU/GPL.
© 2005-2008 Joom.Ru - Joomla!
Design by Mamboteam.com | Powered by Mambobanner.de
  .