Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Bind to Style.TargetType Property

$
0
0

When we create a Style for CellValuePresenter that contains Triggers for specific edit templates to suppress Tooltips app wide for those editors e.g.

<Style.Triggers>             <DataTrigger Binding="{Binding Field.Settings.EditorStyle.TargetType, RelativeSource={RelativeSource Self}}" Value="{x:Type uc:CheckedComboList}"><Setter Property="ToolTipService.IsEnabled" Value="False" /></DataTrigger></Style.Triggers>

we create a memory leak because you can't bind to Style.TargetType without it creating a strong reference via a property descriptor.

Is there a way around this and still have it centralized specifically for the different types of Editors without reproducing the style portion over and over again?

Best regards,

Frank


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>