-
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
feat(Expander): improve Expander #1478
feat(Expander): improve Expander #1478
Conversation
Could you provide a description? It would make it a little easier evaluating the PR if we know what it does :) |
@dotMorten I'll add more info but first I need to make the code work. I asked @IbraheemOsama to see what is wrong with my code. To make it clear, I have an error when I have both a |
</VisualState> | ||
<VisualState x:Name="OverlayHidden"> | ||
<VisualState.Setters> | ||
<Setter Target="PART_MainContent" Value="Visible" /> |
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.
replace the setters with this. you were missing the Visibility property :)
<Setter Target="PART_MainContent.Visibility" Value="Visible" /> <Setter Target="PART_ContentOverlay.Visibility" Value="Visible" />
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.
OMG. That makes sense. Thanks, I will fix that.
/// <summary> | ||
/// Gets or sets a value indicating whether the ContentOverlay of the control. | ||
/// </summary> | ||
public object ContentOverlay |
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.
This should be
public UIElement ContentOverlay
{
get { return (UIElement)GetValue(ContentOverlayProperty); }
set { SetValue(ContentOverlayProperty, value); }
}
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.
No worry. I tried with object to see if it worked better.
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.
Just a single fix and the code will work just fine :)
Thanks for your help @IbraheemOsama Still need to make some animations and update the docs. |
Just FYI, there seems to be few conflicts with the master branch |
@nmetulev Yes. Need to find time to make animations. |
@nmetulev I am a little stuck with animation of Content or Overlay elements. I want to add a Storyboard on the intersection of two VisualStates. Example: When |
@Odonno It wouldn't be untoward to have different states for each expanded direction (i.e. ExpandedRight, ExpandedLeft etc) - a few controls in the platform have similarly overlapping states which does create more states than one would first think necessary, but it is what it is. |
@JohnnyWestlake Well, that means 16 VisualStates. It's a lot but if it's the only way, let's go for it. |
@Odonno well, it'd be the most "standard" way, but spinning ideas you could also have all the transition storyboards you want as resources, and dynamically change the actual VisualTransition storyboard just before state changes ( and let developers know in the documentation about this ) (keeping in mind Storyboards can also have child storyboards inside them). It'd just be an non-standard way of doing things. |
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.
Looks good to me
Improvements on Expander control.
Linked to #966 and #924