-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add Property panel for ViewportBehavior #4320
Add Property panel for ViewportBehavior #4320
Conversation
Thanks XAML-Knight for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
Microsoft.Toolkit.Uwp.UI.Behaviors/Viewport/ViewportBehavior.Properties.cs
Show resolved
Hide resolved
@@ -14,7 +14,7 @@ | |||
Height="200" | |||
Background="Gray"> | |||
<interactivity:Interaction.Behaviors> | |||
<behaviors:ViewportBehavior x:Name="ViewportBehavior" /> | |||
<behaviors:ViewportBehavior x:Name="ViewportBehavior" IsAlwaysOn="@[IsAlwaysOn:Bool:True]" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rather than a toggle we just want this to be on by default (for the sample)?
Microsoft.Toolkit.Uwp.UI.Behaviors/Viewport/ViewportBehavior.Properties.cs
Show resolved
Hide resolved
Addressed requested changes during PR, which leads to Properties panel no longer being shown |
Fixes #4193
PR Type
Bugfix
What is the current behavior?
No Properties panel appears when viewing the
ViewportBehavior
Sample Page, as well as the fact that the event logging (within the page) was not occurring as often as it should have been, if theIsAlwaysOn
bool property was set totrue
.What is the new behavior?
A Properties panel now appears for the ViewportBehavior Sample Page, with a toggle switch for
IsAlwaysOn
, and event logging occurs more frequently, as expected.PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Attempted to properly address the following code, but ran into issues with the logging completely shutting down, regardless of setting the
IsAlwaysOn
property astrue
or not:Interaction.GetBehaviors(obj.AssociatedObject).Remove(obj);
Even when trying to complete the pattern of adding or removing from the underlying
BehaviorCollection
, the associated event becomes unsubscribed, and then no more logging occurs, regardless.