Implement ScrollContainerProperty to allow plugins to disable the default scrollviewer wrapper on their controls
This commit is contained in:
@@ -41,7 +41,9 @@ namespace Torch.Server.Views
|
||||
{
|
||||
if (propertyChangedEventArgs.PropertyName == nameof(PluginManagerViewModel.SelectedPlugin))
|
||||
{
|
||||
if (((PluginManagerViewModel)DataContext).SelectedPlugin.Control is PropertyGrid)
|
||||
var plugin = ((PluginManagerViewModel)DataContext).SelectedPlugin;
|
||||
|
||||
if (plugin.Control is PropertyGrid || !plugin.Control.GetScrollContainer())
|
||||
PScroll.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
|
||||
else
|
||||
PScroll.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
|
||||
|
Reference in New Issue
Block a user