Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
XamDataPresenter v13.1 Theme Error on XamComboEditor
posted

I receive the following error at runtime when using the DataPresenter.  

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=BtnImage'. BindingExpression:Path=ActualHeight; DataItem=null; target element is 'XamComboEditor' (Name=''); target property is 'Height' (type 'Double')

I am attempting to use the Metro theme but since it seems I cannot set "Theme" on the XamComboEditor in XAML I am using the Metro styles (including all required styles).

The issue seems to stem from DataPresenter but shows up regardless of if I include the DataPresenter styles or not. I started including these styles to rid myself of this error. 

The error is not really impacting my application aside from throwing 3 binding errors which the user never sees. The error IS preventing me from performance profiling my application however.

Keep in mind that I get the error regardless of if the style files are included in my application. This is one of the source lines that apparently causes an issue:

From DataPresenterMetro.xaml in the FilterButtonStyleBase style:

<editors:XamComboEditor MinDropDownWidth="150" DropDownResizeMode="None" Opacity="0" ItemsSource="{Binding Operands, RelativeSource={RelativeSource TemplatedParent}}" SelectedItem="{Binding SelectedOperand, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsDropDownOpen="{Binding IsChecked, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" MaxWidth="1" Height="{Binding ActualHeight, ElementName=BtnImage}"/>

I am using the XamDataPresenter and I've specified a CardView. I am not allowing record filtering and I have no fields that would be edited with a combobox.

Parents
  • 130
    posted

    Note: I also get the same error if I change my XamDataPresenter with a CardView to a XamDataCards control. Currently I'm not even including the theme XAML files in the project and I still get the same thing. 

    The only idea that I have currently to get rid of this error is to include all the theme XAML files again and remove the Height binding for the XamComboEditor.

Reply Children