Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various Sample app fixes #1428

Merged
merged 11 commits into from
Aug 25, 2017
Merged

Various Sample app fixes #1428

merged 11 commits into from
Aug 25, 2017

Conversation

nmetulev
Copy link
Contributor

No description provided.

@@ -53,7 +53,7 @@
CompactPaneLength="@[CompactPaneLength:Slider:48:10-80]"
HamburgerHeight="@[HamburgerHeight:Slider:48:10-80]"
HamburgerVisibility="@[HamburgerVisibility:Enum:Visibility.Visible]"
IsPaneOpen="@[IsPaneOpen:Bool:False]">
IsPaneOpen="@[IsPaneOpen:Bool:False]@">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an additional @ here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new syntax, the end @ signifies that the template should generate it using a TwoWay Binding instead of a OneWay Binding.

@@ -427,7 +454,7 @@ private void NavigationFrameOnNavigated(object sender, NavigationEventArgs navig
this._lastRenderedProperties = true;

// Called to load the sample initially as we don't get an Item Pivot Selection Changed with Sample Loaded yet.
UpdateXamlRenderAsync(_currentSample.BindedXamlCode);
var t = UpdateXamlRenderAsync(_currentSample.BindedXamlCode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vat t is unused

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick workaround to remove the VS warning about calling an async method without await.

@@ -488,7 +515,7 @@ private void HamburgerMenu_OnOptionsItemClick(object sender, ItemClickEventArgs
{
_lastRenderedProperties = true;

UpdateXamlRenderAsync(_currentSample.BindedXamlCode);
var t = UpdateXamlRenderAsync(_currentSample.BindedXamlCode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vat t is unused

@@ -502,8 +529,8 @@ private void HamburgerMenu_OnOptionsItemClick(object sender, ItemClickEventArgs
// If we switch to the Live Preview, then we want to use the Value based Text
XamlCodeRenderer.Text = _currentSample.UpdatedXamlCode;

UpdateXamlRenderAsync(_currentSample.UpdatedXamlCode);

var t = UpdateXamlRenderAsync(_currentSample.UpdatedXamlCode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vat t is unused

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why also almost all usages of UpdateXamlRenderAsync is fire and forgot why not awaited ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need the result, it's just to reload the rendering

Copy link
Member

@IbraheemOsama IbraheemOsama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some questions

var code = string.Empty;
if (_currentSample.PropertyDescriptor != null &&
_currentSample.PropertyDescriptor.Options.Count > 0 &&
InfoAreaPivot.SelectedIndex == 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the SelectedItem syntax like we use elsewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, fixed

_currentSample.PropertyDescriptor.Options.Count > 0 &&
InfoAreaPivot.SelectedIndex == 0)
{
code = _currentSample.BindedXamlCode + " ";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the extra space for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing, removed (I was trying something and forgot to remove)

@michael-hawker michael-hawker merged commit 14432c6 into dev Aug 25, 2017
@michael-hawker michael-hawker deleted the sampleAppFixes branch August 25, 2017 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants