Skip to content

Commit

Permalink
BUILD fix samples
Browse files Browse the repository at this point in the history
oops
  • Loading branch information
zadjii authored Feb 14, 2025
1 parent f91f591 commit c3f5cce
Showing 1 changed file with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;
using System.Reflection.Emit;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;

namespace SamplePagesExtension;

internal sealed partial class SampleSettingsPage : FormPage
internal sealed partial class SampleSettingsPage : ContentPage
{
private readonly Settings _settings = new();

Expand All @@ -22,9 +21,9 @@ internal sealed partial class SampleSettingsPage : FormPage
new ChoiceSetSetting.Choice("So many choices", "4"),
};

public override IForm[] Forms()
public override IContent[] GetContent()
{
var s = _settings.ToForms();
var s = _settings.ToContent();
return s;
}

Expand All @@ -33,20 +32,20 @@ public SampleSettingsPage()
Name = "Sample Settings";
Icon = new IconInfo(string.Empty);
_settings.Add(new ToggleSetting("onOff", true)
{
Label = "This is a toggle",
Description = "It produces a simple checkbox",
});
{
Label = "This is a toggle",
Description = "It produces a simple checkbox",
});
_settings.Add(new TextSetting("someText", "initial value")
{
Label = "This is a text box",
Description = "For some string of text",
});
{
Label = "This is a text box",
Description = "For some string of text",
});
_settings.Add(new ChoiceSetSetting("choiceSetExample", _choices)
{
Label = "It also has a label",
Description = "Describe your choice set setting here",
});
{
Label = "It also has a label",
Description = "Describe your choice set setting here",
});

_settings.SettingsChanged += SettingsChanged;
}
Expand Down

0 comments on commit c3f5cce

Please sign in to comment.