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
'C# > Xamarin Maui' 카테고리의 다른 글
[.NET MAUI] SimpleToolkit.Core - 상태바, 액션바 색 변경하기 (0) | 2022.09.21 |
---|---|
[.NET MAUI] SimpleToolkit.Core - 앱 화면 상태바까지 확장하기 (0) | 2022.09.21 |
[.NET MAUI] SimpleToolkit.Core - Icon (0) | 2022.09.21 |
[.NET MAUI] SimpleToolkit.Core - 설치 및 설정 (0) | 2022.09.21 |
[.NET MAUI] SQLITE 사용하기 (0) | 2022.09.20 |