gemini icon indicating copy to clipboard operation
gemini copied to clipboard

Suppress System.Windows.Data Error warnings

Open diluculo opened this issue 7 years ago • 2 comments

PO for #291. Actually, the warnings seem to be harmless. But for our concise output window.

diluculo avatar May 21 '18 11:05 diluculo

Alternatively, they can be eliminated to preserve databinding trace handling:

I think it's actually related to the control template of the default menu item, which expects to be in an itemscontrol.

I'm using a heavily modified version of Gemini, but if you open Themes->VS2013->Controls->Menu.xaml.

All the way at the bottom you can find the default styles for both the MenuItem and the xcad:MenuItemEx. Simply modify them to force the alignment.

    <!--  Set default styles  -->
    <Style BasedOn="{StaticResource MetroSeparator}" TargetType="Separator" />
    <Style BasedOn="{StaticResource MetroMenuItem}" TargetType="MenuItem">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>
    <Style BasedOn="{StaticResource StandardMenu}" TargetType="Menu" />
    <Style BasedOn="{StaticResource MetroContextMenu}" TargetType="ContextMenu" />
    <Style BasedOn="{StaticResource MetroContextMenu}" TargetType="xcad:ContextMenuEx" />
    <Style BasedOn="{StaticResource MetroMenuItem}" TargetType="xcad:MenuItemEx">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>

BHandle avatar Nov 29 '18 22:11 BHandle

Thanks

360manu avatar Apr 10 '20 10:04 360manu