uwp button


Bir Tıklama kullanıcı etkileşimini yorumlayan şablonlu bir düğme denetimini temsil eder.

Namespace:
Windows.UI.Xaml.Controls

C#

 private void OnClick1(object sender, RoutedEventArgs e)

        {

            btn1.Foreground = new SolidColorBrush(Windows.UI.Colors.Beige);

            text1.Text = "merhaba uwp.";

         }

XAML

    <StackPanel x:Name="LayoutRoot" Margin="10">

        <Button x:Name="btn1" Content="Click"

          Click="OnClick1" ClickMode="Hover"

          Margin="5" Width="150"

          HorizontalAlignment="Left"

          Foreground="Navy"/>

        <TextBlock x:Name="text1" Margin="5,8,0,0" Foreground="Maroon" />

    </StackPanel>

Yorumlar