-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
1,301 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<ContentPage Title="Context Menu" BackgroundColor="_selectedColor"> | ||
<VerticalStackLayout> | ||
<Label Text="Right click to open context menu"> | ||
<ContextFlyout> | ||
<MenuFlyout> | ||
<MenuFlyoutItem Text="Black" OnClick="() => SelectColor(Colors.Black)" /> | ||
|
||
<MenuFlyoutSubItem Text="Light"> | ||
<MenuFlyoutItem Text="Blue" OnClick="() => SelectColor(Colors.LightBlue)" /> | ||
<MenuFlyoutItem Text="Coral" OnClick="() => SelectColor(Colors.LightCoral)" /> | ||
<MenuFlyoutItem Text="Cyan" OnClick="() => SelectColor(Colors.LightCyan)" /> | ||
</MenuFlyoutSubItem> | ||
|
||
<MenuFlyoutSubItem Text="Dark"> | ||
<MenuFlyoutItem Text="Blue" OnClick="() => SelectColor(Colors.DarkBlue)" /> | ||
<MenuFlyoutItem Text="DarkMagenta" OnClick="() => SelectColor(Colors.DarkMagenta)" /> | ||
<MenuFlyoutItem Text="Cyan" OnClick="() => SelectColor(Colors.DarkCyan)" /> | ||
</MenuFlyoutSubItem> | ||
</MenuFlyout> | ||
</ContextFlyout> | ||
</Label> | ||
</VerticalStackLayout> | ||
|
||
</ContentPage> | ||
|
||
@code { | ||
Color? _selectedColor = null; | ||
|
||
void SelectColor(Color color) => _selectedColor = color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<ContentPage Title="Menu Bar"> | ||
<MenuBarItems> | ||
<MenuBarItem Text="File"> | ||
<MenuFlyoutItem Text="Save" OnClick="Save"> | ||
<KeyboardAccelerators> | ||
<KeyboardAccelerator Key="S" Modifiers="KeyboardAcceleratorModifiers.Ctrl" /> | ||
</KeyboardAccelerators> | ||
</MenuFlyoutItem> | ||
|
||
<MenuFlyoutItem Text="Exit" OnClick="Exit"> | ||
<KeyboardAccelerators> | ||
<KeyboardAccelerator Key="Q" Modifiers="KeyboardAcceleratorModifiers.Ctrl" /> | ||
</KeyboardAccelerators> | ||
</MenuFlyoutItem> | ||
</MenuBarItem> | ||
|
||
<MenuBarItem Text="Update"> | ||
<MenuFlyoutSubItem Text="Set Value"> | ||
<MenuFlyoutItem Text="1" OnClick="() => SetValue(1)" /> | ||
<MenuFlyoutItem Text="2" OnClick="() => SetValue(2)" /> | ||
<MenuFlyoutItem Text="3" OnClick="() => SetValue(3)" /> | ||
</MenuFlyoutSubItem> | ||
</MenuBarItem> | ||
|
||
</MenuBarItems> | ||
|
||
<ChildContent> | ||
<VerticalStackLayout> | ||
<Label>Selected value: @value</Label> | ||
@if (_saved) | ||
{ | ||
<Label>Values are saved.</Label> | ||
} | ||
</VerticalStackLayout> | ||
</ChildContent> | ||
</ContentPage> | ||
|
||
@code { | ||
bool _saved; | ||
int? value; | ||
|
||
void SetValue(int i) | ||
{ | ||
value = i; | ||
_saved = false; | ||
} | ||
|
||
void Save() | ||
{ | ||
_saved = true; | ||
} | ||
|
||
void Exit() | ||
{ | ||
Application.Current.Quit(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
@using ThirdPartyControlsSample.Pages | ||
|
||
<Shell> | ||
<CommunityToolkitPage/> | ||
<CommunityToolkitBehaviors/> | ||
<XCalendarPage/> | ||
<MaterialComponentsPage/> | ||
<SkiaCanvasPage/> | ||
<CommunityToolkitPage /> | ||
<CommunityToolkitBehaviors /> | ||
<XCalendarPage /> | ||
<SkiaCanvasPage /> | ||
|
||
@if (DeviceInfo.Platform == DevicePlatform.Android || DeviceInfo.Platform == DevicePlatform.iOS) | ||
{ | ||
<MaterialComponentsPage /> | ||
<BottomSheetPage /> | ||
} | ||
</Shell> |
132 changes: 0 additions & 132 deletions
132
...es/ThirdPartyControlsSample/Elements/Material.Components/MDSKTouchCanvasView.generated.cs
This file was deleted.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
samples/ThirdPartyControlsSample/Elements/The49.BottomSheet/AnchorDetent.generated.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// <auto-generated> | ||
// This code was generated by a BlazorBindings.Maui component generator. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
|
||
using BlazorBindings.Core; | ||
using BlazorBindings.Maui.Elements; | ||
using MC = Microsoft.Maui.Controls; | ||
using Microsoft.AspNetCore.Components; | ||
using Microsoft.AspNetCore.Components.Rendering; | ||
using System.Threading.Tasks; | ||
using TMB = The49.Maui.BottomSheet; | ||
|
||
#pragma warning disable MBB001 | ||
|
||
namespace BlazorBindings.Maui.Elements.The49.BottomSheet | ||
{ | ||
public partial class AnchorDetent : Detent | ||
{ | ||
static AnchorDetent() | ||
{ | ||
RegisterAdditionalHandlers(); | ||
} | ||
|
||
[Parameter] public RenderFragment Anchor { get; set; } | ||
|
||
public new TMB.AnchorDetent NativeControl => (TMB.AnchorDetent)((BindableObject)this).NativeControl; | ||
|
||
protected override TMB.AnchorDetent CreateNativeElement() => new(); | ||
|
||
protected override void HandleParameter(string name, object value) | ||
{ | ||
switch (name) | ||
{ | ||
case nameof(Anchor): | ||
Anchor = (RenderFragment)value; | ||
break; | ||
|
||
default: | ||
base.HandleParameter(name, value); | ||
break; | ||
} | ||
} | ||
|
||
protected override void RenderAdditionalElementContent(RenderTreeBuilder builder, ref int sequence) | ||
{ | ||
base.RenderAdditionalElementContent(builder, ref sequence); | ||
RenderTreeBuilderHelper.AddContentProperty<TMB.AnchorDetent>(builder, sequence++, Anchor, (x, value) => x.Anchor = (MC.VisualElement)value); | ||
} | ||
|
||
static partial void RegisterAdditionalHandlers(); | ||
} | ||
} |
Oops, something went wrong.