728x90
반응형

 Button 을 Custom 하게 디자인 할수 있다. (WPF 랑 비슷함)

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    x:Class="Maui.SimpleToolKitTest.MainPage"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:simpleCore="clr-namespace:SimpleToolkit.Core;assembly=SimpleToolkit.Core">

    <ScrollView>
        <VerticalStackLayout
            Padding="30,0"
            Spacing="25"
            VerticalOptions="Center">
         
            <simpleCore:ContentButton WidthRequest="120">
                <Border Background="#0D0D0D">
                    <Border.StrokeShape>
                        <RoundRectangle CornerRadius="6" />
                    </Border.StrokeShape>
                    <HorizontalStackLayout
                        Padding="12,10"
                        HorizontalOptions="Center"
                        Spacing="10">
                        <simpleCore:Icon
                            HeightRequest="18"
                            Source="keilogo.png"
                            TintColor="#2B6747"
                            VerticalOptions="Center"
                            WidthRequest="18" />
                        <Label
                            FontAttributes="Bold"
                            HorizontalOptions="Center"
                            HorizontalTextAlignment="Center"
                            Text="keisoft"
                            TextColor="White"
                            VerticalOptions="Center" />
                        <simpleCore:Icon
                            HeightRequest="18"
                            Source="keilogo.png"
                            TintColor="#CEAA44"
                            VerticalOptions="Center"
                            WidthRequest="18" />
                    </HorizontalStackLayout>
                </Border>
            </simpleCore:ContentButton>

            <Button
                x:Name="CounterBtn"
                Clicked="OnCounterClicked"
                HorizontalOptions="Center"
                SemanticProperties.Hint="Counts the number of times you click"
                Text="Click me" />

        </VerticalStackLayout>
    </ScrollView>

</ContentPage>

버튼 클릭 시 아무런 효과가 없어 아쉬움..

[Source]
https://github.com/kei-soft/KJunBlog/tree/master/Maui.SimpleToolKitTest

728x90
반응형
Posted by kjun

댓글을 달아 주세요