-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1201 from HandyOrg/add-ribbon-menu
Add ribbon menu
- Loading branch information
Showing
17 changed files
with
1,309 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Media; | ||
using HandyControl.Data; | ||
|
||
namespace HandyControl.Controls | ||
{ | ||
public class ClipGrid : Grid | ||
{ | ||
public static readonly DependencyProperty IsClipEnabledProperty = DependencyProperty.Register( | ||
"IsClipEnabled", typeof(bool), typeof(ClipGrid), new PropertyMetadata(ValueBoxes.TrueBox)); | ||
|
||
public bool IsClipEnabled | ||
{ | ||
get => (bool) GetValue(IsClipEnabledProperty); | ||
set => SetValue(IsClipEnabledProperty, ValueBoxes.BooleanBox(value)); | ||
} | ||
|
||
protected override Geometry GetLayoutClip(Size layoutSlotSize) | ||
{ | ||
if (IsClipEnabled) | ||
{ | ||
return base.GetLayoutClip(layoutSlotSize); | ||
} | ||
|
||
return null; | ||
} | ||
} | ||
} |
Oops, something went wrong.