Skip to content

Commit

Permalink
First iteration of ResourceBrowser.
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzzer committed Mar 12, 2016
1 parent 32cd972 commit 47cb6d1
Show file tree
Hide file tree
Showing 27 changed files with 624 additions and 450 deletions.
29 changes: 12 additions & 17 deletions ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
Solution structure


1. Universal class library projects

The toolkit is made of C# class library projects targeting UWP that enable sharing the code
in class libraries that target both Windows and Windows Phone apps for Windows 10.

Both target platform versions of each library share dll name and namespace.
One of the reasons is to enable sharing XAML files that include paths to resources, such as
Source="ms-appx:///WinRTXamlToolkit/Controls/AlternativeFrame/AlternativeFrame.xaml"
Universal class library project is not a template in VS, but is manually created based on universal app project


2. NuGet packages

...
Solution structure


1. Universal class library projects

The toolkit is made of C# class library projects targeting UWP that enable sharing the code
in class libraries that target Windows and Windows Phone apps for Windows 10.


2. NuGet packages

...
14 changes: 7 additions & 7 deletions WinRTXamlToolkit.Debugging/ViewModels/BasePropertyViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace WinRTXamlToolkit.Debugging.ViewModels
{
public abstract class BasePropertyViewModel : BindableBase
{
public DependencyObjectViewModel ElementModel { get; private set; }
public DependencyObjectViewModel ElementViewModel { get; private set; }

public const string AppearanceCategoryName = "Appearance";
public const string BrushCategoryName = "Brush";
Expand Down Expand Up @@ -85,7 +85,7 @@ public async void FindSimilar()
DebugConsoleViewModel.Instance.ToolWindows.Add(vm);
}

private async Task AddSimilarElementsAsync(List<object> elements, object baseValue, TreeItemViewModel item)
private async Task AddSimilarElementsAsync(List<object> elements, object baseValue, VisualTreeItemViewModel item)
{
var dobvm = item as DependencyObjectViewModel;

Expand All @@ -102,7 +102,7 @@ private async Task AddSimilarElementsAsync(List<object> elements, object baseVal

if (item.Children == null ||
item.Children.Count == 0 ||
(item.Children.Count == 1 && item.Children[0] is StubTreeItemViewModel))
(item.Children.Count == 1 && item.Children[0] is StubVisualTreeItemViewModel))
{
await item.LoadChildrenAsync();
}
Expand All @@ -114,16 +114,16 @@ private async Task AddSimilarElementsAsync(List<object> elements, object baseVal

foreach (var child in item.Children)
{
await this.AddSimilarElementsAsync(elements, baseValue, child);
await this.AddSimilarElementsAsync(elements, baseValue, (VisualTreeItemViewModel)child);
}
}
#endregion

public RelayCommand FindSimilarCommand { get; private set; }

public BasePropertyViewModel(DependencyObjectViewModel elementModel)
public BasePropertyViewModel(DependencyObjectViewModel elementViewModel)
{
this.ElementModel = elementModel;
this.ElementViewModel = elementViewModel;
this.ResetValueCommand = new RelayCommand(
this.ResetValue,
() => this.CanResetValue);
Expand All @@ -133,7 +133,7 @@ public BasePropertyViewModel(DependencyObjectViewModel elementModel)
this.FindSimilarCommand = new RelayCommand(
this.FindSimilar,
() => this.CanFindSimilar);
this.PropertyChanged += OnPropertyChanged;
this.PropertyChanged += this.OnPropertyChanged;
}

private void OnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
Expand Down
Loading

0 comments on commit 47cb6d1

Please sign in to comment.