private NotifyPropertyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void | ||
e | System.Windows.DependencyPropertyChangedEventArgs | |
return | void |
internal void NotifyPropertyChanged(DependencyPropertyChangedEventArgs e)
{
if (e.Property == ItemTemplateProperty || e.Property == RibbonGallery.GalleryItemTemplateProperty)
{
PropertyHelper.TransferProperty(this, ItemTemplateProperty);
}
else if (e.Property == ItemContainerStyleProperty || e.Property == RibbonGallery.GalleryItemStyleProperty)
{
PropertyHelper.TransferProperty(this, ItemContainerStyleProperty);
}
else if (e.Property == MinColumnCountProperty)
{
PropertyHelper.TransferProperty(this, MinColumnCountProperty);
}
else if (e.Property == MaxColumnCountProperty)
{
PropertyHelper.TransferProperty(this, MaxColumnCountProperty);
}
}
private static void OnNotifyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RibbonGalleryCategory galleryCategory = (RibbonGalleryCategory)d; galleryCategory.NotifyPropertyChanged(e); // This is for the layout related properties MinColumnCount/MaxColumnCount IsSharedColumnScope // and MaxColumnWidth on RibbonGallery/RibbonGalleryCategory. This calls InvalidateMeasure // for all the categories' ItemsPanel and they must use changed values. if (e.Property == MinColumnCountProperty || e.Property == MaxColumnCountProperty || e.Property == IsSharedColumnSizeScopeProperty || e.Property == ColumnsStretchToFillProperty) { RibbonGallery gallery = galleryCategory.RibbonGallery; if (gallery != null) { gallery.InvalidateMeasureOnAllCategoriesPanel(); } } }