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

Windows Presentation Foundation (WPF). 4. XAML, .

2, XAML . , , 3, Windows Grid, , , Button. XAML , . :

  • IList, IList.Add(), .
  • IDictionary,  IDictionary.Add() .   x:Key, .

  • ContentProperty, , .

3, Background Grid:

    <Grid>

        <Grid.Background>

            <LinearGradientBrush>

                <LinearGradientBrush.GradientStops>

                    <GradientStop Offset="0.0" Color="Red"/>

                    <GradientStop Offset="0.5" Color="Indigo"/>

                    <GradientStop Offset="1.5" Color="Violet"/>

                </LinearGradientBrush.GradientStops>

            </LinearGradientBrush>

        </Grid.Background>

        <Button Content="" Height="23" HorizontalAlignment="Left" Margin="88,41,0,0" Name="MyButton" VerticalAlignment="Top" Width="75" />

    </Grid>

  LinearGradientBrush.GradientStops , . , . GradientStop IList, , IList.Add().

, :

        <Grid.Background>

            <LinearGradientBrush>

                <LinearGradientBrush.GradientStops>

                    <GradientStopCollection>

                        <GradientStop Offset="0.0" Color="Red"/>

                        <GradientStop Offset="0.5" Color="Indigo"/>

                        <GradientStop Offset="1.5" Color="Violet"/>

                    </GradientStopCollection>

                </LinearGradientBrush.GradientStops>

            </LinearGradientBrush>

        </Grid.Background>

. , Grid , . Grid . , Grid ContentProperty, , . ContentProperty Panel Grid Children.

XAML ContentProperty , IList . , <Button> <TextBox>, XAML Content, :

Windows Presentation Foundation (WPF).  4.   XAML,    .

<Button> , , :

Windows Presentation Foundation (WPF).  4.   XAML,    .

:

Windows Presentation Foundation (WPF).  4.   XAML,    .

:

        private void Button_Click(object sender, RoutedEventArgs e)

        {

            MessageBox.Show("");

        }

 

        private void button1_Click(object sender, RoutedEventArgs e)

        {

            MessageBox.Show("1");

        }

, .

, :

Windows Presentation Foundation (WPF).  4.   XAML,    .

. XAML XML. , , , < > , , . ? . :

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