Skip to content

Commit

Permalink
Move pages, add realms, but didnt work
Browse files Browse the repository at this point in the history
  • Loading branch information
NotYoojun committed Dec 22, 2024
1 parent b7e7749 commit 28e4306
Show file tree
Hide file tree
Showing 195 changed files with 951 additions and 585 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
menuItem.IsSelected = true;
NavigationRootPage.Current.NavigationView.Header = string.Empty;

Items = ControlInfoDataSource.Instance.Groups.SelectMany(g => g.Items).OrderBy(i => i.Title).ToList();
Items = ControlInfoDataSource.Instance.AllGroups.SelectMany(g => g.Items).OrderBy(i => i.Title).ToList();
DataContext = Items;
}
}
Expand Down
10 changes: 5 additions & 5 deletions source/iNKORE.UI.WPF.Modern.Gallery/Common/ImageLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ namespace iNKORE.UI.WPF.Modern.Gallery.Common
{
public class ImageLoader
{
public static string GetSource(DependencyObject obj)
public static ControlInfoDataItem GetSource(DependencyObject obj)
{
return (string)obj.GetValue(SourceProperty);
return (ControlInfoDataItem)obj.GetValue(SourceProperty);
}

public static void SetSource(DependencyObject obj, string value)
public static void SetSource(DependencyObject obj, ControlInfoDataItem value)
{
obj.SetValue(SourceProperty, value);
}

// Using a DependencyProperty as the backing store for Path. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SourceProperty =
DependencyProperty.RegisterAttached("Source", typeof(string), typeof(ImageLoader), new PropertyMetadata(string.Empty, OnPropertyChanged));
DependencyProperty.RegisterAttached("Source", typeof(ControlInfoDataItem), typeof(ImageLoader), new PropertyMetadata(null, OnPropertyChanged));

private async static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is Image image)
{
var item = await ControlInfoDataSource.Instance.GetItemAsync(e.NewValue?.ToString());
var item = e.NewValue as ControlInfoDataItem;
if (item?.ImagePath != null)
{
Uri imageUri = new Uri(item.ImagePath, UriKind.Relative);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties":
{
Expand Down Expand Up @@ -118,7 +117,11 @@
"description": "Documentation link url"
}
},
"required": [ "Title", "Uri" ]
"required":
[
"Title",
"Uri"
]
},
"description": "Add a link to the doc in the Documentation dropdown on the detail page of this control"
},
Expand All @@ -133,11 +136,29 @@
"description": "Array of names of the related control"
}
},
"required": [ "UniqueId", "Title", "Subtitle", "ImagePath", "ImageIconPath", "Description", "Content" ]
"required":
[
"UniqueId",
"Title",
"Subtitle",
"ImagePath",
"ImageIconPath",
"Description",
"Content"
]
}
}
},
"required": [ "UniqueId", "Title", "Subtitle", "ImagePath", "ImageIconPath", "Description", "Items" ]
"required":
[
"UniqueId",
"Title",
"Subtitle",
"ImagePath",
"ImageIconPath",
"Description",
"Items"
]
}
}
},
Expand Down
316 changes: 189 additions & 127 deletions source/iNKORE.UI.WPF.Modern.Gallery/DataModel/ControlInfoDataItem.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
// Everything from CommunityToolkit
"$schema": "../ControlInfoData.schema.json",

"Groups":
[
{
"UniqueId": "Input",
"Title": "Input",
"Subtitle": "",
"ImagePath": "",
"ImageIconPath": "",
"Description": "",
"Items":
[
]
},
{
"UniqueId": "Layout",
"Title": "Layout",
"Subtitle": "",
"ImagePath": "",
"ImageIconPath": "",
"Description": "Use layout controls to arrange the controls and content in your app."
},
{
"UniqueId": "Media",
"Title": "Media",
"Subtitle": "",
"ImagePath": "",
"ImageIconPath": "",
"Description": ""
},
{
"UniqueId": "Sizers",
"Title": "Sizers",
"Subtitle": "",
"ImagePath": "",
"ImageIconPath": "",
"Description": ""
},
{
"UniqueId": "StatusAndInfo",
"Title": "Status and Info",
"Subtitle": "",
"ImagePath": "",
"ImageIconPath": "",
"Description": ""
},
{
"UniqueId": "Text",
"Title": "Text",
"Subtitle": "",
"ImagePath": "",
"ImageIconPath": "",
"Description": ""
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../ControlInfoData.schema.json",
"Groups":
[

]
}
Loading

0 comments on commit 28e4306

Please sign in to comment.