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

Add "IsSeparatorVisible" to RibbonGroupBox #324

Closed
maurosampietro opened this issue Jun 10, 2016 · 0 comments
Closed

Add "IsSeparatorVisible" to RibbonGroupBox #324

maurosampietro opened this issue Jun 10, 2016 · 0 comments
Assignees
Milestone

Comments

@maurosampietro
Copy link
Contributor

maurosampietro commented Jun 10, 2016

A ribbongroupbox always shows a separator. Sometimes it is desirable to hide it.

Here's the code, let me know if you merge. Thank you.

Add a new DependencyProperty In RibbonGroupBox.cs

#region IsSeparatorVisible
public bool IsSeparatorVisible
{
    get { return (bool)GetValue( IsSeparatorVisibleProperty ); }
    set { SetValue( IsSeparatorVisibleProperty, value ); }
 }

// Using a DependencyProperty as the backing store for IsSeparatorVisible.  This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsSeparatorVisibleProperty =
  DependencyProperty.Register( "IsSeparatorVisible", typeof( bool ), typeof( RibbonGroupBox ), new PropertyMetadata( true ) );
 #endregion

Add this line in File RibbonGroupBox.xaml, to element x:name="separator", line 654:

Visibility="{Binding IsSeparatorVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}"

@batzen batzen changed the title Little enhancement Add "IsSeparatorVisible" to RibbonGroupBox Jun 10, 2016
@batzen batzen added this to the 5.0.0 milestone Jun 10, 2016
@batzen batzen self-assigned this Jun 10, 2016
@batzen batzen closed this as completed in 153af6c Jun 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants